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_USER_ACTION: | 51 case CLOSE_DISMISS: |
52 case CLOSE_DISMISS_DEACTIVATION: { | 52 controller_->OnBubbleDismiss(); |
53 bool close_by_deactivate = action == CLOSE_DISMISS_DEACTIVATION; | |
54 controller_->OnBubbleDismiss(close_by_deactivate); | |
55 break; | 53 break; |
56 } | |
57 case CLOSE_EXECUTE: | 54 case CLOSE_EXECUTE: |
58 controller_->OnBubbleAction(); | 55 controller_->OnBubbleAction(); |
59 break; | 56 break; |
60 case CLOSE_LEARN_MORE: | 57 case CLOSE_LEARN_MORE: |
61 controller_->OnLinkClicked(); | 58 controller_->OnLinkClicked(); |
62 break; | 59 break; |
63 } | 60 } |
64 } | 61 } |
OLD | NEW |