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

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

Issue 2606293002: Remove ScopedVector from chrome/browser/ui. (Closed)
Patch Set: nits Created 3 years, 11 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 <memory>
9 #include <vector>
10
8 #include "base/macros.h" 11 #include "base/macros.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 12 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/ui/website_settings/permission_prompt.h" 13 #include "chrome/browser/ui/website_settings/permission_prompt.h"
11 14
12 namespace base { 15 namespace base {
13 class CommandLine; 16 class CommandLine;
14 } 17 }
15 class PermissionRequest; 18 class PermissionRequest;
16 class Browser; 19 class Browser;
17 20
(...skipping 17 matching lines...) Expand all
35 class PermissionBubbleBrowserTest : public ExtensionBrowserTest { 38 class PermissionBubbleBrowserTest : public ExtensionBrowserTest {
36 public: 39 public:
37 PermissionBubbleBrowserTest(); 40 PermissionBubbleBrowserTest();
38 ~PermissionBubbleBrowserTest() override; 41 ~PermissionBubbleBrowserTest() override;
39 42
40 void SetUpOnMainThread() override; 43 void SetUpOnMainThread() override;
41 44
42 // Opens an app window, and returns the associated browser. 45 // Opens an app window, and returns the associated browser.
43 Browser* OpenExtensionAppWindow(); 46 Browser* OpenExtensionAppWindow();
44 47
45 std::vector<PermissionRequest*> requests() { return requests_.get(); } 48 std::vector<PermissionRequest*> requests();
46 std::vector<bool> accept_states() { return accept_states_; } 49 std::vector<bool> accept_states() { return accept_states_; }
47 PermissionPrompt::Delegate* test_delegate() { return &test_delegate_; } 50 PermissionPrompt::Delegate* test_delegate() { return &test_delegate_; }
48 51
49 private: 52 private:
50 TestPermissionBubbleViewDelegate test_delegate_; 53 TestPermissionBubbleViewDelegate test_delegate_;
51 ScopedVector<PermissionRequest> requests_; 54 std::vector<std::unique_ptr<PermissionRequest>> requests_;
52 std::vector<bool> accept_states_; 55 std::vector<bool> accept_states_;
53 56
54 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleBrowserTest); 57 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleBrowserTest);
55 }; 58 };
56 59
57 // Use this class to test on a kiosk window. 60 // Use this class to test on a kiosk window.
58 class PermissionBubbleKioskBrowserTest : public PermissionBubbleBrowserTest { 61 class PermissionBubbleKioskBrowserTest : public PermissionBubbleBrowserTest {
59 public: 62 public:
60 PermissionBubbleKioskBrowserTest(); 63 PermissionBubbleKioskBrowserTest();
61 ~PermissionBubbleKioskBrowserTest() override; 64 ~PermissionBubbleKioskBrowserTest() override;
62 65
63 void SetUpCommandLine(base::CommandLine* command_line) override; 66 void SetUpCommandLine(base::CommandLine* command_line) override;
64 67
65 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleKioskBrowserTest); 68 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleKioskBrowserTest);
66 }; 69 };
67 70
68 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_BROWSER_TEST_UTI L_H_ 71 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_BROWSER_TEST_UTI L_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698