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

Unified Diff: content/shell/renderer/test_runner/notification_presenter.cc

Issue 583113002: Abstract class WebTestDelegate to chromium c++ style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test_runner Created 6 years, 3 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: content/shell/renderer/test_runner/notification_presenter.cc
diff --git a/content/shell/renderer/test_runner/notification_presenter.cc b/content/shell/renderer/test_runner/notification_presenter.cc
index 48ddb6890f63d19f5d5027d2bc3b70e077f51afb..f5c152bf9fd216912765ffe2c53a6e581705c34c 100644
--- a/content/shell/renderer/test_runner/notification_presenter.cc
+++ b/content/shell/renderer/test_runner/notification_presenter.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "content/common/desktop_notification_messages.h"
-#include "content/shell/renderer/test_runner/WebTestDelegate.h"
+#include "content/shell/renderer/test_runner/web_test_delegate.h"
#include "third_party/WebKit/public/platform/Platform.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
@@ -65,37 +65,37 @@ bool NotificationPresenter::show(const WebNotification& notification) {
if (!notification.replaceId().isEmpty()) {
std::string replaceId(notification.replaceId().utf8());
if (replacements_.find(replaceId) != replacements_.end()) {
- delegate_->printMessage(std::string("REPLACING NOTIFICATION ") +
+ delegate_->PrintMessage(std::string("REPLACING NOTIFICATION ") +
replacements_.find(replaceId)->second + "\n");
}
replacements_[replaceId] = notification.title().utf8();
}
- delegate_->printMessage("DESKTOP NOTIFICATION SHOWN: ");
+ delegate_->PrintMessage("DESKTOP NOTIFICATION SHOWN: ");
if (!notification.title().isEmpty())
- delegate_->printMessage(notification.title().utf8().data());
+ delegate_->PrintMessage(notification.title().utf8().data());
if (notification.direction() == WebTextDirectionRightToLeft)
- delegate_->printMessage(", RTL");
+ delegate_->PrintMessage(", RTL");
// TODO(beverloo): WebNotification should expose the "lang" attribute's value.
if (!notification.body().isEmpty()) {
- delegate_->printMessage(std::string(", body: ") +
+ delegate_->PrintMessage(std::string(", body: ") +
notification.body().utf8().data());
}
if (!notification.replaceId().isEmpty()) {
- delegate_->printMessage(std::string(", tag: ") +
+ delegate_->PrintMessage(std::string(", tag: ") +
notification.replaceId().utf8().data());
}
if (!notification.iconURL().isEmpty()) {
- delegate_->printMessage(std::string(", icon: ") +
+ delegate_->PrintMessage(std::string(", icon: ") +
notification.iconURL().spec().data());
}
- delegate_->printMessage("\n");
+ delegate_->PrintMessage("\n");
std::string title = notification.title().utf8();
active_notifications_[title] = notification;
@@ -109,7 +109,7 @@ bool NotificationPresenter::show(const WebNotification& notification) {
void NotificationPresenter::cancel(const WebNotification& notification) {
std::string title = notification.title().utf8();
- delegate_->printMessage(std::string("DESKTOP NOTIFICATION CLOSED: ") + title +
+ delegate_->PrintMessage(std::string("DESKTOP NOTIFICATION CLOSED: ") + title +
"\n");
WebNotification event_target(notification);
@@ -126,7 +126,7 @@ void NotificationPresenter::objectDestroyed(
WebNotificationPresenter::Permission NotificationPresenter::checkPermission(
const WebSecurityOrigin& security_origin) {
- return delegate_->checkWebNotificationPermission(
+ return delegate_->CheckWebNotificationPermission(
GURL(security_origin.toString()));
}

Powered by Google App Engine
This is Rietveld 408576698