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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_message_bubble_bridge.mm

Issue 1455313002: [Reland][Extensions] Don't count bubble focus loss as acknowledgment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698