| OLD | NEW |
| 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_PERMISSION_BUBBLE_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_PERMISSION_BUBBLE_COCOA_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_PERMISSION_BUBBLE_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_PERMISSION_BUBBLE_COCOA_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 explicit PermissionBubbleCocoa(Browser* browser); | 23 explicit PermissionBubbleCocoa(Browser* browser); |
| 24 ~PermissionBubbleCocoa() override; | 24 ~PermissionBubbleCocoa() override; |
| 25 | 25 |
| 26 // PermissionPrompt: | 26 // PermissionPrompt: |
| 27 void Show(const std::vector<PermissionRequest*>& requests, | 27 void Show(const std::vector<PermissionRequest*>& requests, |
| 28 const std::vector<bool>& accept_state) override; | 28 const std::vector<bool>& accept_state) override; |
| 29 void Hide() override; | 29 void Hide() override; |
| 30 bool IsVisible() override; | 30 bool IsVisible() override; |
| 31 void SetDelegate(Delegate* delegate) override; | 31 void SetDelegate(Delegate* delegate) override; |
| 32 bool CanAcceptRequestUpdate() override; | 32 bool CanAcceptRequestUpdate() override; |
| 33 bool HidesAutomatically() override; |
| 33 void UpdateAnchorPosition() override; | 34 void UpdateAnchorPosition() override; |
| 34 gfx::NativeWindow GetNativeWindow() override; | 35 gfx::NativeWindow GetNativeWindow() override; |
| 35 | 36 |
| 36 // Called when |bubbleController_| is closing. | 37 // Called when |bubbleController_| is closing. |
| 37 void OnBubbleClosing(); | 38 void OnBubbleClosing(); |
| 38 | 39 |
| 39 private: | 40 private: |
| 40 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest, | 41 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest, |
| 41 HasLocationBarByDefault); | 42 HasLocationBarByDefault); |
| 42 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest, | 43 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest, |
| 43 BrowserFullscreenHasLocationBar); | 44 BrowserFullscreenHasLocationBar); |
| 44 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest, | 45 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest, |
| 45 TabFullscreenHasLocationBar); | 46 TabFullscreenHasLocationBar); |
| 46 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest, AppHasNoLocationBar); | 47 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest, AppHasNoLocationBar); |
| 47 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleKioskBrowserTest, | 48 FRIEND_TEST_ALL_PREFIXES(PermissionBubbleKioskBrowserTest, |
| 48 KioskHasNoLocationBar); | 49 KioskHasNoLocationBar); |
| 49 | 50 |
| 50 Browser* browser_; // Weak. | 51 Browser* browser_; // Weak. |
| 51 Delegate* delegate_; // Weak. | 52 Delegate* delegate_; // Weak. |
| 52 | 53 |
| 53 // 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. |
| 54 PermissionBubbleController* bubbleController_; | 55 PermissionBubbleController* bubbleController_; |
| 55 | 56 |
| 56 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa); | 57 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa); |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_PERMISSION_BUBBLE_COCOA_H_ | 60 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_PERMISSION_BUBBLE_COCOA_H_ |
| OLD | NEW |