| Index: chrome/browser/ui/website_settings/mock_permission_prompt.h
|
| diff --git a/chrome/browser/ui/website_settings/mock_permission_prompt.h b/chrome/browser/ui/website_settings/mock_permission_prompt.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a3a1d01bd0150fa47b053d2085934dd39f4593b1
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/website_settings/mock_permission_prompt.h
|
| @@ -0,0 +1,43 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_PROMPT_H_
|
| +#define CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_PROMPT_H_
|
| +
|
| +#include "chrome/browser/ui/website_settings/permission_prompt.h"
|
| +
|
| +class MockPermissionPromptFactory;
|
| +class PermissionRequestManager;
|
| +
|
| +// Provides a skeleton class for unit and browser testing when trying to test
|
| +// the request manager logic. Should not be used for anything that requires
|
| +// actual UI.
|
| +// Use the MockPermissionPromptFactory to create this.
|
| +class MockPermissionPrompt : public PermissionPrompt {
|
| + public:
|
| + ~MockPermissionPrompt() override;
|
| +
|
| + // PermissionPrompt:
|
| + void SetDelegate(Delegate* delegate) override {}
|
| + void Show(const std::vector<PermissionRequest*>& requests,
|
| + const std::vector<bool>& accept_state) override;
|
| + bool CanAcceptRequestUpdate() override;
|
| + void Hide() override;
|
| + bool IsVisible() override;
|
| + void UpdateAnchorPosition() override;
|
| + gfx::NativeWindow GetNativeWindow() override;
|
| +
|
| + private:
|
| + friend class MockPermissionPromptFactory;
|
| +
|
| + MockPermissionPrompt(MockPermissionPromptFactory* factory,
|
| + PermissionRequestManager* manager);
|
| +
|
| + MockPermissionPromptFactory* factory_;
|
| + PermissionRequestManager* manager_;
|
| + bool can_update_ui_;
|
| + bool is_visible_;
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_PROMPT_H_
|
|
|