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

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

Issue 1154943008: Update push messaging tests to use both infobars and bubbles (w/ autoresponse) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Factor out the GetPermissionBubbleManager calls Created 5 years, 6 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_PERMISSION_BUBBLE_RESPONDER_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_RESPONDER_H_
7
8 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
9
10 // Use the PermissionBubbleResponder in tests to automate accepting, denying,
11 // or dismissing permission requests. This should ONLY be used for testing.
12 class PermissionBubbleResponder : public PermissionBubbleManager::Observer {
13 public:
14 enum BubbleResponse {
15 ACCEPT_ALL,
16 DENY_ALL,
17 DISMISS
18 };
19
20 PermissionBubbleResponder(PermissionBubbleManager* manager,
21 BubbleResponse desired_response);
22 ~PermissionBubbleResponder() override;
23
24 // PermissionBubbleManager::Observer:
25 void OnBubbleAdded() override;
26
27 private:
28 void Respond();
29
30 PermissionBubbleManager* manager_;
31 const BubbleResponse desired_response_;
32
33 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleResponder);
34 };
35
36 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_RESPONDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698