| Index: chrome/browser/ui/website_settings/permission_bubble_responder.h
|
| diff --git a/chrome/browser/ui/website_settings/permission_bubble_responder.h b/chrome/browser/ui/website_settings/permission_bubble_responder.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5ff36e88d1624473fda8f6e9d25cb4754682e3c7
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/website_settings/permission_bubble_responder.h
|
| @@ -0,0 +1,36 @@
|
| +// 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_PERMISSION_BUBBLE_RESPONDER_H_
|
| +#define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_RESPONDER_H_
|
| +
|
| +#include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
|
| +
|
| +// Use the PermissionBubbleResponder in tests to automate accepting, denying,
|
| +// or dismissing permission requests. This should ONLY be used for testing.
|
| +class PermissionBubbleResponder : public PermissionBubbleManager::Observer {
|
| + public:
|
| + enum BubbleResponse {
|
| + ACCEPT_ALL,
|
| + DENY_ALL,
|
| + DISMISS
|
| + };
|
| +
|
| + PermissionBubbleResponder(PermissionBubbleManager* manager,
|
| + BubbleResponse desired_response);
|
| + ~PermissionBubbleResponder() override;
|
| +
|
| + // PermissionBubbleManager::Observer:
|
| + void OnBubbleAdded() override;
|
| +
|
| + private:
|
| + void Respond();
|
| +
|
| + PermissionBubbleManager* manager_;
|
| + const BubbleResponse desired_response_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PermissionBubbleResponder);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_RESPONDER_H_
|
|
|