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

Side by Side Diff: chrome/browser/ui/website_settings/mock_permission_prompt.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 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_PROMPT_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_PROMPT_H_
7
8 #include "chrome/browser/ui/website_settings/permission_prompt.h"
9
10 class MockPermissionPromptFactory;
11 class PermissionRequestManager;
12
13 // Provides a skeleton class for unit and browser testing when trying to test
14 // the request manager logic. Should not be used for anything that requires
15 // actual UI.
16 // Use the MockPermissionPromptFactory to create this.
17 class MockPermissionPrompt : public PermissionPrompt {
18 public:
19 ~MockPermissionPrompt() override;
20
21 // PermissionPrompt:
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 MockPermissionPromptFactory;
33
34 MockPermissionPrompt(MockPermissionPromptFactory* factory,
35 PermissionRequestManager* manager);
36
37 MockPermissionPromptFactory* factory_;
38 PermissionRequestManager* manager_;
39 bool can_update_ui_;
40 bool is_visible_;
41 };
42
43 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_PROMPT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698