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

Unified Diff: chrome/browser/notifications/notification_interactive_uitest.cc

Issue 2081103002: Rename PermissionBubbleManager to PermissionRequestManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/notification_interactive_uitest.cc
diff --git a/chrome/browser/notifications/notification_interactive_uitest.cc b/chrome/browser/notifications/notification_interactive_uitest.cc
index 454830e484ab881e8e6a9ab8d9c5773ddda263f8..453fb59b79811c1e402537accbf0bade1104f6d5 100644
--- a/chrome/browser/notifications/notification_interactive_uitest.cc
+++ b/chrome/browser/notifications/notification_interactive_uitest.cc
@@ -23,12 +23,12 @@
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/notifications/desktop_notification_profile_util.h"
#include "chrome/browser/notifications/notification.h"
+#include "chrome/browser/permissions/permission_request_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
-#include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
@@ -141,17 +141,18 @@ class MessageCenterChangeObserver
};
// Used to observe the creation of permission prompt without responding.
-class PermissionRequestObserver : public PermissionBubbleManager::Observer {
+class PermissionRequestObserver : public PermissionRequestManager::Observer {
public:
explicit PermissionRequestObserver(content::WebContents* web_contents)
- : bubble_manager_(PermissionBubbleManager::FromWebContents(web_contents)),
+ : request_manager_(
+ PermissionRequestManager::FromWebContents(web_contents)),
request_shown_(false),
message_loop_runner_(new content::MessageLoopRunner) {
- bubble_manager_->AddObserver(this);
+ request_manager_->AddObserver(this);
}
~PermissionRequestObserver() override {
// Safe to remove twice if it happens.
- bubble_manager_->RemoveObserver(this);
+ request_manager_->RemoveObserver(this);
}
void Wait() { message_loop_runner_->Run(); }
@@ -159,14 +160,14 @@ class PermissionRequestObserver : public PermissionBubbleManager::Observer {
bool request_shown() { return request_shown_; }
private:
- // PermissionBubbleManager::Observer
+ // PermissionRequestManager::Observer
void OnBubbleAdded() override {
request_shown_ = true;
- bubble_manager_->RemoveObserver(this);
+ request_manager_->RemoveObserver(this);
message_loop_runner_->Quit();
}
- PermissionBubbleManager* bubble_manager_;
+ PermissionRequestManager* request_manager_;
bool request_shown_;
scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
@@ -226,7 +227,7 @@ class NotificationsTest : public InProcessBrowserTest {
void DropOriginPreference(const GURL& origin);
std::string RequestAndRespondToPermission(
Browser* browser,
- PermissionBubbleManager::AutoResponseType bubble_response);
+ PermissionRequestManager::AutoResponseType bubble_response);
};
int NotificationsTest::GetNotificationCount() {
@@ -303,10 +304,10 @@ std::string NotificationsTest::CreateSimpleNotification(
std::string NotificationsTest::RequestAndRespondToPermission(
Browser* browser,
- PermissionBubbleManager::AutoResponseType bubble_response) {
+ PermissionRequestManager::AutoResponseType bubble_response) {
std::string result;
content::WebContents* web_contents = GetActiveWebContents(browser);
- PermissionBubbleManager::FromWebContents(web_contents)
+ PermissionRequestManager::FromWebContents(web_contents)
->set_auto_response_for_test(bubble_response);
EXPECT_TRUE(content::ExecuteScriptAndExtractString(
web_contents, "requestPermission();", &result));
@@ -315,19 +316,19 @@ std::string NotificationsTest::RequestAndRespondToPermission(
bool NotificationsTest::RequestAndAcceptPermission(Browser* browser) {
std::string result = RequestAndRespondToPermission(
- browser, PermissionBubbleManager::ACCEPT_ALL);
+ browser, PermissionRequestManager::ACCEPT_ALL);
return "request-callback-granted" == result;
}
bool NotificationsTest::RequestAndDenyPermission(Browser* browser) {
- std::string result =
- RequestAndRespondToPermission(browser, PermissionBubbleManager::DENY_ALL);
+ std::string result = RequestAndRespondToPermission(
+ browser, PermissionRequestManager::DENY_ALL);
return "request-callback-denied" == result;
}
bool NotificationsTest::RequestAndDismissPermission(Browser* browser) {
std::string result =
- RequestAndRespondToPermission(browser, PermissionBubbleManager::DISMISS);
+ RequestAndRespondToPermission(browser, PermissionRequestManager::DISMISS);
return "request-callback-default" == result;
}

Powered by Google App Engine
This is Rietveld 408576698