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

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

Issue 1086973004: [Extensions Mac] Implement developer mode warning on mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avi's Created 5 years, 8 months 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/cocoa/extensions/extension_message_bubble_bridge.h"
6
7 #include "chrome/browser/extensions/extension_message_bubble_controller.h"
8 #include "chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.h"
9
10 ExtensionMessageBubbleBridge::ExtensionMessageBubbleBridge(
11 scoped_ptr<extensions::ExtensionMessageBubbleController> controller)
12 : controller_(controller.Pass()),
13 bubble_(nil) {
14 }
15
16 ExtensionMessageBubbleBridge::~ExtensionMessageBubbleBridge() {
17 }
18
19 void ExtensionMessageBubbleBridge::SetBubble(
20 ToolbarActionsBarBubbleMac* bubble) {
21 DCHECK(!bubble_);
22 bubble_ = bubble;
23 }
24
25 void ExtensionMessageBubbleBridge::Show() {
26 DCHECK(bubble_);
27 [bubble_ showWindow:nil];
28 }
29
30 base::string16 ExtensionMessageBubbleBridge::GetHeadingText() {
31 return controller_->delegate()->GetTitle();
32 }
33
34 base::string16 ExtensionMessageBubbleBridge::GetBodyText() {
35 return controller_->delegate()->GetMessageBody(true);
36 }
37
38 base::string16 ExtensionMessageBubbleBridge::GetActionButtonText() {
39 return controller_->delegate()->GetActionButtonLabel();
40 }
41
42 base::string16 ExtensionMessageBubbleBridge::GetDismissButtonText() {
43 return controller_->delegate()->GetDismissButtonLabel();
44 }
45
46 base::string16 ExtensionMessageBubbleBridge::GetLearnMoreButtonText() {
47 return controller_->delegate()->GetLearnMoreLabel();
48 }
49
50 void ExtensionMessageBubbleBridge::OnBubbleShown() {
51 }
52
53 void ExtensionMessageBubbleBridge::OnBubbleClosed(CloseAction action) {
54 switch(action) {
55 case CLOSE_DISMISS:
56 controller_->OnBubbleDismiss();
57 break;
58 case CLOSE_EXECUTE:
59 controller_->OnBubbleAction();
60 break;
61 case CLOSE_LEARN_MORE:
62 controller_->OnLinkClicked();
63 break;
64 }
65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698