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

Side by Side Diff: chrome/browser/ui/website_settings/mock_permission_bubble_view.h

Issue 2182883002: Permissions: Rename PermissionBubbleView to PermissionPromptInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig@ review 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
(Empty)
1 // Copyright 2015 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_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_VIEW_H_
7
8 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
9
10 class MockPermissionBubbleFactory;
11 class PermissionRequestManager;
12
13 // Provides a skeleton class for unit and browser testing when trying to test
14 // the bubble manager logic. Should not be used for anything that requires
15 // actual UI.
16 // Use the MockPermissionBubbleFactory to create this.
17 class MockPermissionBubbleView : public PermissionBubbleView {
18 public:
19 ~MockPermissionBubbleView() override;
20
21 // PermissionBubbleView:
22 void SetDelegate(Delegate* delegate) override {}
23 void Show(const std::vector<PermissionRequest*>& requests,
24 const std::vector<bool>& accept_state) override;
25 bool CanAcceptRequestUpdate() override;
26 void Hide() override;
27 bool IsVisible() override;
28 void UpdateAnchorPosition() override;
29 gfx::NativeWindow GetNativeWindow() override;
30
31 private:
32 friend class MockPermissionBubbleFactory;
33
34 MockPermissionBubbleView(MockPermissionBubbleFactory* factory,
35 PermissionRequestManager* manager);
36
37 MockPermissionBubbleFactory* factory_;
38 PermissionRequestManager* manager_;
39 bool can_update_ui_;
40 bool is_visible_;
41 };
42
43 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698