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

Unified Diff: chrome/browser/ui/extensions/blocked_action_bubble_delegate.cc

Issue 1809813002: [Extensions] Show a "refresh" bubble when needed with click-to-script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment Created 4 years, 9 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/ui/extensions/blocked_action_bubble_delegate.cc
diff --git a/chrome/browser/ui/extensions/blocked_action_bubble_delegate.cc b/chrome/browser/ui/extensions/blocked_action_bubble_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..288ffef57667ade236aa921650e7c07de0bfa9b2
--- /dev/null
+++ b/chrome/browser/ui/extensions/blocked_action_bubble_delegate.cc
@@ -0,0 +1,53 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/extensions/blocked_action_bubble_delegate.h"
+
+#include "base/callback_helpers.h"
+#include "base/strings/string16.h"
+#include "grit/generated_resources.h"
+#include "ui/base/l10n/l10n_util.h"
+
+BlockedActionBubbleDelegate::BlockedActionBubbleDelegate(
+ const base::Callback<void(CloseAction)>& callback,
+ const std::string& extension_id)
+ : callback_(callback), extension_id_(extension_id) {}
+
+BlockedActionBubbleDelegate::~BlockedActionBubbleDelegate() {}
+
+base::string16 BlockedActionBubbleDelegate::GetHeadingText() {
+ return l10n_util::GetStringUTF16(IDS_EXTENSION_BLOCKED_ACTION_BUBBLE_HEADING);
+}
+
+base::string16 BlockedActionBubbleDelegate::GetBodyText() {
+ return l10n_util::GetStringUTF16(IDS_EXTENSION_BLOCKED_ACTION_BUBBLE_CONTENT);
+}
+
+base::string16 BlockedActionBubbleDelegate::GetItemListText() {
+ return base::string16(); // No item list.
+}
+
+base::string16 BlockedActionBubbleDelegate::GetActionButtonText() {
+ return l10n_util::GetStringUTF16(
+ IDS_EXTENSION_BLOCKED_ACTION_BUBBLE_OK_BUTTON);
+}
+
+base::string16 BlockedActionBubbleDelegate::GetDismissButtonText() {
+ return l10n_util::GetStringUTF16(
+ IDS_EXTENSION_BLOCKED_ACTION_BUBBLE_CANCEL_BUTTON);
+}
+
+base::string16 BlockedActionBubbleDelegate::GetLearnMoreButtonText() {
+ return base::string16(); // No learn more link.
+}
+
+std::string BlockedActionBubbleDelegate::GetAnchorActionId() {
+ return extension_id_;
+}
+
+void BlockedActionBubbleDelegate::OnBubbleShown() {}
+
+void BlockedActionBubbleDelegate::OnBubbleClosed(CloseAction action) {
+ base::ResetAndReturn(&callback_).Run(action);
+}

Powered by Google App Engine
This is Rietveld 408576698