| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 base::string16 ExtensionMessageBubbleBridge::GetLearnMoreButtonText() { | 42 base::string16 ExtensionMessageBubbleBridge::GetLearnMoreButtonText() { |
| 43 return controller_->delegate()->GetLearnMoreLabel(); | 43 return controller_->delegate()->GetLearnMoreLabel(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void ExtensionMessageBubbleBridge::OnBubbleShown() { | 46 void ExtensionMessageBubbleBridge::OnBubbleShown() { |
| 47 } | 47 } |
| 48 | 48 |
| 49 void ExtensionMessageBubbleBridge::OnBubbleClosed(CloseAction action) { | 49 void ExtensionMessageBubbleBridge::OnBubbleClosed(CloseAction action) { |
| 50 switch(action) { | 50 switch(action) { |
| 51 case CLOSE_DISMISS: | 51 case CLOSE_DISMISS_USER_ACTION: |
| 52 controller_->OnBubbleDismiss(); | 52 case CLOSE_DISMISS_DEACTIVATION: { |
| 53 bool close_by_deactivate = action == CLOSE_DISMISS_DEACTIVATION; |
| 54 controller_->OnBubbleDismiss(close_by_deactivate); |
| 53 break; | 55 break; |
| 56 } |
| 54 case CLOSE_EXECUTE: | 57 case CLOSE_EXECUTE: |
| 55 controller_->OnBubbleAction(); | 58 controller_->OnBubbleAction(); |
| 56 break; | 59 break; |
| 57 case CLOSE_LEARN_MORE: | 60 case CLOSE_LEARN_MORE: |
| 58 controller_->OnLinkClicked(); | 61 controller_->OnLinkClicked(); |
| 59 break; | 62 break; |
| 60 } | 63 } |
| 61 } | 64 } |
| OLD | NEW |