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

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

Issue 2233293003: Position Mac permission bubbles on the left when in fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix MacViews bubbles Created 4 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 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 8 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
9 #include "chrome/browser/ui/website_settings/permission_prompt.h" 9 #include "chrome/browser/ui/website_settings/permission_prompt.h"
10 #include "ui/base/models/simple_menu_model.h" 10 #include "ui/base/models/simple_menu_model.h"
(...skipping 24 matching lines...) Expand all
35 35
36 // Designated initializer. |browser| and |bridge| must both be non-nil. 36 // Designated initializer. |browser| and |bridge| must both be non-nil.
37 - (id)initWithBrowser:(Browser*)browser bridge:(PermissionBubbleCocoa*)bridge; 37 - (id)initWithBrowser:(Browser*)browser bridge:(PermissionBubbleCocoa*)bridge;
38 38
39 // Returns the anchor point to use for the given Cocoa |browser|. 39 // Returns the anchor point to use for the given Cocoa |browser|.
40 + (NSPoint)getAnchorPointForBrowser:(Browser*)browser; 40 + (NSPoint)getAnchorPointForBrowser:(Browser*)browser;
41 41
42 // Returns true if |browser| has a visible location bar. 42 // Returns true if |browser| has a visible location bar.
43 + (bool)hasVisibleLocationBarForBrowser:(Browser*)browser; 43 + (bool)hasVisibleLocationBarForBrowser:(Browser*)browser;
44 44
45 // Returns the constant offset from the left to use for fullscreen permission
46 // bubbles. Only used in tests.
47 + (NSInteger)getFullscreenLeftOffset;
tapted 2016/08/12 04:25:39 you can move this to `@interface PermissionBubbleC
benwells 2016/08/12 06:29:44 Done.
48
45 // Makes the bubble visible. The bubble will be popuplated with text retrieved 49 // Makes the bubble visible. The bubble will be popuplated with text retrieved
46 // from |requests|. |delegate| will receive callbacks for user actions. 50 // from |requests|. |delegate| will receive callbacks for user actions.
47 - (void)showWithDelegate:(PermissionPrompt::Delegate*)delegate 51 - (void)showWithDelegate:(PermissionPrompt::Delegate*)delegate
48 forRequests:(const std::vector<PermissionRequest*>&)requests 52 forRequests:(const std::vector<PermissionRequest*>&)requests
49 acceptStates:(const std::vector<bool>&)acceptStates; 53 acceptStates:(const std::vector<bool>&)acceptStates;
50 54
51 // Will reposition the bubble based in case the anchor or parent should change. 55 // Will reposition the bubble based in case the anchor or parent should change.
52 - (void)updateAnchorPosition; 56 - (void)updateAnchorPosition;
53 57
54 // Will calculate the expected anchor point for this bubble. 58 // Will calculate the expected anchor point for this bubble.
55 // Should only be used outside this class for tests. 59 // Should only be used outside this class for tests.
56 - (NSPoint)getExpectedAnchorPoint; 60 - (NSPoint)getExpectedAnchorPoint;
57 61
58 // Returns true if the browser has a visible location bar. 62 // Returns true if the browser has a visible location bar.
59 // Should only be used outside this class for tests. 63 // Should only be used outside this class for tests.
60 - (bool)hasVisibleLocationBar; 64 - (bool)hasVisibleLocationBar;
61 65
62 @end 66 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698