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

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

Issue 787033004: Update geolocation permission tests for the permission bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tim's nits Created 5 years, 10 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_request.h"
9 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
10
11 class MockPermissionBubbleView : public PermissionBubbleView {
markusheintz_ 2015/02/02 10:46:52 optional: I think a few words about when and how t
felt 2015/02/02 13:03:09 Done.
12 public:
13 MockPermissionBubbleView();
14 ~MockPermissionBubbleView() override;
15
16 // PermissionBubbleView:
17 void SetDelegate(Delegate* delegate) override;
18 void Show(const std::vector<PermissionBubbleRequest*>& requests,
19 const std::vector<bool>& accept_state,
20 bool customization_state_) override;
21 bool CanAcceptRequestUpdate() override;
22 void Hide() override;
23 bool IsVisible() override;
24
25 // Wrappers that update the state of the bubble.
26 void Accept();
27 void Deny();
28 void Close();
29 void Clear();
30
31 // If we're in a browser test, we need to interact with the message loop.
32 // But that shouldn't be done in unit tests.
33 void SetBrowserTest(bool browser_test);
34
35 private:
36 bool visible_;
37 bool can_accept_updates_;
38 Delegate* delegate_;
39 bool browser_test_;
40 std::vector<PermissionBubbleRequest*> permission_requests_;
41 std::vector<bool> permission_states_;
42 };
43
44 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698