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

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

Issue 986333006: Center permission bubble if location bar is hidden in MacOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fallthrough Created 5 years, 9 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/cocoa/info_bubble_view.h"
11 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" 12 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
12 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
13 14
14 #ifdef __OBJC__ 15 #ifdef __OBJC__
15 @class PermissionBubbleController; 16 @class PermissionBubbleController;
16 #else 17 #else
17 class PermissionBubbleController; 18 class PermissionBubbleController;
18 #endif 19 #endif
19 20
20 class PermissionBubbleCocoa : public PermissionBubbleView { 21 class PermissionBubbleCocoa : public PermissionBubbleView {
(...skipping 15 matching lines...) Expand all
36 // Returns the point, in screen coordinates, to which the bubble's arrow 37 // Returns the point, in screen coordinates, to which the bubble's arrow
37 // should point. 38 // should point.
38 NSPoint GetAnchorPoint(); 39 NSPoint GetAnchorPoint();
39 40
40 // Returns the NSWindow containing the bubble. 41 // Returns the NSWindow containing the bubble.
41 NSWindow* window(); 42 NSWindow* window();
42 43
43 // Change the parent window to be used the next time the bubble is shown. 44 // Change the parent window to be used the next time the bubble is shown.
44 void SwitchParentWindow(NSWindow* parent); 45 void SwitchParentWindow(NSWindow* parent);
45 46
47 bool HasOmnibar();
groby-ooo-7-16 2015/03/16 22:09:35 Why is this public?
hcarmona 2015/03/30 20:44:28 Doesn't need to be public. Made protected. Or woul
48 info_bubble::BubbleArrowLocation GetArrowLocation();
49
46 private: 50 private:
47 NSWindow* parent_window_; // Weak. 51 NSWindow* parent_window_; // Weak.
48 Delegate* delegate_; // Weak. 52 Delegate* delegate_; // Weak.
49 53
50 // Cocoa-side UI controller for the bubble. Weak, as it will close itself. 54 // Cocoa-side UI controller for the bubble. Weak, as it will close itself.
51 PermissionBubbleController* bubbleController_; 55 PermissionBubbleController* bubbleController_;
52 56
53 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa); 57 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa);
54 }; 58 };
55 59
56 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ 60 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698