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

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: Fix test names Created 5 years, 8 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/gtest_prod_util.h"
8 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
9 #include "base/macros.h" 10 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/ui/cocoa/info_bubble_view.h"
11 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" 13 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
12 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
13 15
14 #ifdef __OBJC__ 16 #ifdef __OBJC__
15 @class PermissionBubbleController; 17 @class PermissionBubbleController;
16 #else 18 #else
17 class PermissionBubbleController; 19 class PermissionBubbleController;
18 #endif 20 #endif
19 21
20 class PermissionBubbleCocoa : public PermissionBubbleView { 22 class PermissionBubbleCocoa : public PermissionBubbleView {
(...skipping 15 matching lines...) Expand all
36 // Returns the point, in screen coordinates, to which the bubble's arrow 38 // Returns the point, in screen coordinates, to which the bubble's arrow
37 // should point. 39 // should point.
38 NSPoint GetAnchorPoint(); 40 NSPoint GetAnchorPoint();
39 41
40 // Returns the NSWindow containing the bubble. 42 // Returns the NSWindow containing the bubble.
41 NSWindow* window(); 43 NSWindow* window();
42 44
43 // Change the parent window to be used the next time the bubble is shown. 45 // Change the parent window to be used the next time the bubble is shown.
44 void SwitchParentWindow(NSWindow* parent); 46 void SwitchParentWindow(NSWindow* parent);
45 47
46 private: 48 info_bubble::BubbleArrowLocation GetArrowLocation();
49
50 private:
51 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest,
52 HasLocationBarByDefault);
53 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest,
54 FullscreenHasLocationBar);
55 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleAppBrowserTest, AppHasNoLocationBar);
56 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleKioskBrowserTest,
57 KioskHasNoLocationBar);
58
47 NSWindow* parent_window_; // Weak. 59 NSWindow* parent_window_; // Weak.
48 Delegate* delegate_; // Weak. 60 Delegate* delegate_; // Weak.
49 61
50 // Cocoa-side UI controller for the bubble. Weak, as it will close itself. 62 // Cocoa-side UI controller for the bubble. Weak, as it will close itself.
51 PermissionBubbleController* bubbleController_; 63 PermissionBubbleController* bubbleController_;
64 virtual bool HasLocationBar();
52 65
53 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa); 66 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa);
54 }; 67 };
55 68
56 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ 69 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/base_bubble_controller.mm ('k') | chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698