| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "chrome/browser/ui/cocoa/extensions/extension_message_bubble_bridge.h" | 5 #include "chrome/browser/ui/cocoa/extensions/extension_message_bubble_bridge.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_message_bubble_controller.h" | 7 #include "chrome/browser/extensions/extension_message_bubble_controller.h" |
| 8 #include "chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.h" | 8 #include "chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.h" |
| 9 | 9 |
| 10 ExtensionMessageBubbleBridge::ExtensionMessageBubbleBridge( | 10 ExtensionMessageBubbleBridge::ExtensionMessageBubbleBridge( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 void ExtensionMessageBubbleBridge::Show() { | 27 void ExtensionMessageBubbleBridge::Show() { |
| 28 DCHECK(bubble_); | 28 DCHECK(bubble_); |
| 29 [bubble_ showWindow:nil]; | 29 [bubble_ showWindow:nil]; |
| 30 } | 30 } |
| 31 | 31 |
| 32 base::string16 ExtensionMessageBubbleBridge::GetHeadingText() { | 32 base::string16 ExtensionMessageBubbleBridge::GetHeadingText() { |
| 33 return controller_->delegate()->GetTitle(); | 33 return controller_->delegate()->GetTitle(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 base::string16 ExtensionMessageBubbleBridge::GetBodyText() { | 36 base::string16 ExtensionMessageBubbleBridge::GetBodyText() { |
| 37 return controller_->delegate()->GetMessageBody(anchored_to_extension_); | 37 return controller_->delegate()->GetMessageBody( |
| 38 anchored_to_extension_, |
| 39 controller_->GetExtensionIdList().size()); |
| 38 } | 40 } |
| 39 | 41 |
| 40 base::string16 ExtensionMessageBubbleBridge::GetItemListText() { | 42 base::string16 ExtensionMessageBubbleBridge::GetItemListText() { |
| 41 return controller_->GetExtensionListForDisplay(); | 43 return controller_->GetExtensionListForDisplay(); |
| 42 } | 44 } |
| 43 | 45 |
| 44 base::string16 ExtensionMessageBubbleBridge::GetActionButtonText() { | 46 base::string16 ExtensionMessageBubbleBridge::GetActionButtonText() { |
| 45 return controller_->delegate()->GetActionButtonLabel(); | 47 return controller_->delegate()->GetActionButtonLabel(); |
| 46 } | 48 } |
| 47 | 49 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 62 controller_->OnBubbleDismiss(); | 64 controller_->OnBubbleDismiss(); |
| 63 break; | 65 break; |
| 64 case CLOSE_EXECUTE: | 66 case CLOSE_EXECUTE: |
| 65 controller_->OnBubbleAction(); | 67 controller_->OnBubbleAction(); |
| 66 break; | 68 break; |
| 67 case CLOSE_LEARN_MORE: | 69 case CLOSE_LEARN_MORE: |
| 68 controller_->OnLinkClicked(); | 70 controller_->OnLinkClicked(); |
| 69 break; | 71 break; |
| 70 } | 72 } |
| 71 } | 73 } |
| OLD | NEW |