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

Side by Side Diff: chrome/browser/permissions/permission_request_manager_test_api.h

Issue 2675483002: Replace PermissionType in chrome/ with ContentSettingsType (Closed)
Patch Set: rebase + include content_settings_types.h more Created 3 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_PERMISSIONS_PERMISSION_REQUEST_MANAGER_TEST_API_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_TEST_API_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_TEST_API_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_TEST_API_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/permissions/permission_request_manager.h" 9 #include "chrome/browser/permissions/permission_request_manager.h"
10 #include "content/public/browser/permission_type.h" 10 #include "components/content_settings/core/common/content_settings_types.h"
11 11
12 class Browser; 12 class Browser;
13 class Profile; 13 class Profile;
14 14
15 namespace test { 15 namespace test {
16 16
17 class PermissionRequestManagerTestApi { 17 class PermissionRequestManagerTestApi {
18 public: 18 public:
19 explicit PermissionRequestManagerTestApi(PermissionRequestManager* manager); 19 explicit PermissionRequestManagerTestApi(PermissionRequestManager* manager);
20 20
21 // Wraps the PermissionRequestManager for the active tab in |browser|. 21 // Wraps the PermissionRequestManager for the active tab in |browser|.
22 explicit PermissionRequestManagerTestApi(Browser* browser); 22 explicit PermissionRequestManagerTestApi(Browser* browser);
23 23
24 PermissionRequestManager* manager() { return manager_; } 24 PermissionRequestManager* manager() { return manager_; }
25 25
26 // Add a "simple" permission request. One that uses PermissionRequestImpl, 26 // Add a "simple" permission request. One that uses PermissionRequestImpl,
27 // such as for content::PermissionType including MIDI_SYSEX, PUSH_MESSAGING, 27 // such as for ContentSettingsType including MIDI_SYSEX, PUSH_MESSAGING,
28 // NOTIFICATIONS, GEOLOCATON, or FLASH. This can be called multiple times 28 // NOTIFICATIONS, GEOLOCATON, or PLUGINS. This can be called multiple times
29 // before a call to manager()->DisplayPendingRequests(). 29 // before a call to manager()->DisplayPendingRequests().
30 void AddSimpleRequest(Profile* profile, content::PermissionType type); 30 void AddSimpleRequest(Profile* profile, ContentSettingsType type);
31 31
32 // Return the bubble window for the permission prompt or null if there is no 32 // Return the bubble window for the permission prompt or null if there is no
33 // prompt currently showing. 33 // prompt currently showing.
34 gfx::NativeWindow GetPromptWindow(); 34 gfx::NativeWindow GetPromptWindow();
35 35
36 private: 36 private:
37 PermissionRequestManager* manager_; 37 PermissionRequestManager* manager_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(PermissionRequestManagerTestApi); 39 DISALLOW_COPY_AND_ASSIGN(PermissionRequestManagerTestApi);
40 }; 40 };
41 41
42 } // namespace test 42 } // namespace test
43 43
44 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_TEST_API_H_ 44 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_TEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698