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

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

Issue 2748443005: Rename website_settings UI folders to permission_bubble. (Closed)
Patch Set: Rebase. Created 3 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
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_PERMISSION_BUBBLE_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_PERMISSION_BUBBLE_COCOA_H_
7
8 #import <Foundation/Foundation.h>
9
10 #include "base/gtest_prod_util.h"
11 #include "base/mac/scoped_nsobject.h"
12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/ui/cocoa/info_bubble_view.h"
15 #include "chrome/browser/ui/website_settings/permission_prompt.h"
16 #include "content/public/browser/web_contents.h"
17
18 class Browser;
19 @class PermissionBubbleController;
20
21 class PermissionBubbleCocoa : public PermissionPrompt {
22 public:
23 explicit PermissionBubbleCocoa(Browser* browser);
24 ~PermissionBubbleCocoa() override;
25
26 // PermissionPrompt:
27 void Show(const std::vector<PermissionRequest*>& requests,
28 const std::vector<bool>& accept_state) override;
29 void Hide() override;
30 bool IsVisible() override;
31 void SetDelegate(Delegate* delegate) override;
32 bool CanAcceptRequestUpdate() override;
33 void UpdateAnchorPosition() override;
34 gfx::NativeWindow GetNativeWindow() override;
35
36 // Called when |bubbleController_| is closing.
37 void OnBubbleClosing();
38
39 private:
40 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest,
41 HasLocationBarByDefault);
42 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest,
43 BrowserFullscreenHasLocationBar);
44 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest,
45 TabFullscreenHasLocationBar);
46 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest, AppHasNoLocationBar);
47 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleKioskBrowserTest,
48 KioskHasNoLocationBar);
49
50 Browser* browser_; // Weak.
51 Delegate* delegate_; // Weak.
52
53 // Cocoa-side UI controller for the bubble. Weak, as it will close itself.
54 PermissionBubbleController* bubbleController_;
55
56 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa);
57 };
58
59 #endif // CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_PERMISSION_BUBBLE_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698