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

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

Issue 2123653006: Rename PermissionBubbleRequest to PermissionRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_manager_rename
Patch Set: Fix missed file Created 4 years, 5 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_BROWSER_TEST_UTIL_H _ 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_BROWSER_TEST_UTIL_H _
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_BROWSER_TEST_UTIL_H _ 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_BROWSER_TEST_UTIL_H _
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" 10 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
11 11
12 namespace base { 12 namespace base {
13 class CommandLine; 13 class CommandLine;
14 } 14 }
15 class PermissionBubbleRequest; 15 class PermissionRequest;
16 class Browser; 16 class Browser;
17 17
18 class TestPermissionBubbleViewDelegate : public PermissionBubbleView::Delegate { 18 class TestPermissionBubbleViewDelegate : public PermissionBubbleView::Delegate {
19 public: 19 public:
20 TestPermissionBubbleViewDelegate(); 20 TestPermissionBubbleViewDelegate();
21 21
22 void ToggleAccept(int, bool) override {} 22 void ToggleAccept(int, bool) override {}
23 void Accept() override {} 23 void Accept() override {}
24 void Deny() override {} 24 void Deny() override {}
25 void Closing() override {} 25 void Closing() override {}
26 26
27 private: 27 private:
28 DISALLOW_COPY_AND_ASSIGN(TestPermissionBubbleViewDelegate); 28 DISALLOW_COPY_AND_ASSIGN(TestPermissionBubbleViewDelegate);
29 }; 29 };
30 30
31 // Use this class to test on a default window or an app window. Inheriting from 31 // Use this class to test on a default window or an app window. Inheriting from
32 // ExtensionBrowserTest allows us to easily load and launch apps, and doesn't 32 // ExtensionBrowserTest allows us to easily load and launch apps, and doesn't
33 // really add any extra work. 33 // really add any extra work.
34 class PermissionBubbleBrowserTest : public ExtensionBrowserTest { 34 class PermissionBubbleBrowserTest : public ExtensionBrowserTest {
35 public: 35 public:
36 PermissionBubbleBrowserTest(); 36 PermissionBubbleBrowserTest();
37 ~PermissionBubbleBrowserTest() override; 37 ~PermissionBubbleBrowserTest() override;
38 38
39 void SetUpOnMainThread() override; 39 void SetUpOnMainThread() override;
40 40
41 // Opens an app window, and returns the associated browser. 41 // Opens an app window, and returns the associated browser.
42 Browser* OpenExtensionAppWindow(); 42 Browser* OpenExtensionAppWindow();
43 43
44 std::vector<PermissionBubbleRequest*> requests() { return requests_.get(); } 44 std::vector<PermissionRequest*> requests() { return requests_.get(); }
45 std::vector<bool> accept_states() { return accept_states_; } 45 std::vector<bool> accept_states() { return accept_states_; }
46 PermissionBubbleView::Delegate* test_delegate() { return &test_delegate_; } 46 PermissionBubbleView::Delegate* test_delegate() { return &test_delegate_; }
47 47
48 private: 48 private:
49 TestPermissionBubbleViewDelegate test_delegate_; 49 TestPermissionBubbleViewDelegate test_delegate_;
50 ScopedVector<PermissionBubbleRequest> requests_; 50 ScopedVector<PermissionRequest> requests_;
51 std::vector<bool> accept_states_; 51 std::vector<bool> accept_states_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleBrowserTest); 53 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleBrowserTest);
54 }; 54 };
55 55
56 // Use this class to test on a kiosk window. 56 // Use this class to test on a kiosk window.
57 class PermissionBubbleKioskBrowserTest : public PermissionBubbleBrowserTest { 57 class PermissionBubbleKioskBrowserTest : public PermissionBubbleBrowserTest {
58 public: 58 public:
59 PermissionBubbleKioskBrowserTest(); 59 PermissionBubbleKioskBrowserTest();
60 ~PermissionBubbleKioskBrowserTest() override; 60 ~PermissionBubbleKioskBrowserTest() override;
61 61
62 void SetUpCommandLine(base::CommandLine* command_line) override; 62 void SetUpCommandLine(base::CommandLine* command_line) override;
63 63
64 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleKioskBrowserTest); 64 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleKioskBrowserTest);
65 }; 65 };
66 66
67 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_BROWSER_TEST_UTI L_H_ 67 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_BROWSER_TEST_UTI L_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698