| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/extensions/blocked_action_bubble_delegate.h" |
| 6 |
| 7 #include "base/callback_helpers.h" |
| 8 #include "base/strings/string16.h" |
| 9 #include "grit/generated_resources.h" |
| 10 #include "ui/base/l10n/l10n_util.h" |
| 11 |
| 12 BlockedActionBubbleDelegate::BlockedActionBubbleDelegate( |
| 13 const base::Callback<void(CloseAction)>& callback, |
| 14 const std::string& extension_id) |
| 15 : callback_(callback), extension_id_(extension_id) {} |
| 16 |
| 17 BlockedActionBubbleDelegate::~BlockedActionBubbleDelegate() {} |
| 18 |
| 19 base::string16 BlockedActionBubbleDelegate::GetHeadingText() { |
| 20 return l10n_util::GetStringUTF16(IDS_EXTENSION_BLOCKED_ACTION_BUBBLE_HEADING); |
| 21 } |
| 22 |
| 23 base::string16 BlockedActionBubbleDelegate::GetBodyText() { |
| 24 return l10n_util::GetStringUTF16(IDS_EXTENSION_BLOCKED_ACTION_BUBBLE_CONTENT); |
| 25 } |
| 26 |
| 27 base::string16 BlockedActionBubbleDelegate::GetItemListText() { |
| 28 return base::string16(); // No item list. |
| 29 } |
| 30 |
| 31 base::string16 BlockedActionBubbleDelegate::GetActionButtonText() { |
| 32 return l10n_util::GetStringUTF16( |
| 33 IDS_EXTENSION_BLOCKED_ACTION_BUBBLE_OK_BUTTON); |
| 34 } |
| 35 |
| 36 base::string16 BlockedActionBubbleDelegate::GetDismissButtonText() { |
| 37 return l10n_util::GetStringUTF16( |
| 38 IDS_EXTENSION_BLOCKED_ACTION_BUBBLE_CANCEL_BUTTON); |
| 39 } |
| 40 |
| 41 base::string16 BlockedActionBubbleDelegate::GetLearnMoreButtonText() { |
| 42 return base::string16(); // No learn more link. |
| 43 } |
| 44 |
| 45 std::string BlockedActionBubbleDelegate::GetAnchorActionId() { |
| 46 return extension_id_; |
| 47 } |
| 48 |
| 49 void BlockedActionBubbleDelegate::OnBubbleShown() {} |
| 50 |
| 51 void BlockedActionBubbleDelegate::OnBubbleClosed(CloseAction action) { |
| 52 base::ResetAndReturn(&callback_).Run(action); |
| 53 } |
| OLD | NEW |