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

Side by Side Diff: chrome/browser/ui/extensions/blocked_action_bubble_delegate.cc

Issue 2206693002: Improve settings override bubble to indicate policy installed extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Non-Mac implementation of badge/extra view, that is, admin icon and text Created 4 years, 4 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/extensions/blocked_action_bubble_delegate.h" 5 #include "chrome/browser/ui/extensions/blocked_action_bubble_delegate.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "grit/components_scaled_resources.h"
9 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 #include "ui/base/resource/resource_bundle.h"
11 13
12 BlockedActionBubbleDelegate::BlockedActionBubbleDelegate( 14 BlockedActionBubbleDelegate::BlockedActionBubbleDelegate(
13 const base::Callback<void(CloseAction)>& callback, 15 const base::Callback<void(CloseAction)>& callback,
14 const std::string& extension_id) 16 const std::string& extension_id)
15 : callback_(callback), extension_id_(extension_id) {} 17 : callback_(callback), extension_id_(extension_id) {}
16 18
17 BlockedActionBubbleDelegate::~BlockedActionBubbleDelegate() {} 19 BlockedActionBubbleDelegate::~BlockedActionBubbleDelegate() {}
18 20
19 bool BlockedActionBubbleDelegate::ShouldShow() { 21 bool BlockedActionBubbleDelegate::ShouldShow() {
20 // TODO(devlin): Technically, this could be wrong if the extension no longer 22 // TODO(devlin): Technically, this could be wrong if the extension no longer
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 57
56 std::string BlockedActionBubbleDelegate::GetAnchorActionId() { 58 std::string BlockedActionBubbleDelegate::GetAnchorActionId() {
57 return extension_id_; 59 return extension_id_;
58 } 60 }
59 61
60 void BlockedActionBubbleDelegate::OnBubbleShown() {} 62 void BlockedActionBubbleDelegate::OnBubbleShown() {}
61 63
62 void BlockedActionBubbleDelegate::OnBubbleClosed(CloseAction action) { 64 void BlockedActionBubbleDelegate::OnBubbleClosed(CloseAction action) {
63 base::ResetAndReturn(&callback_).Run(action); 65 base::ResetAndReturn(&callback_).Run(action);
64 } 66 }
67
68 std::unique_ptr<ToolbarActionsBarBubbleDelegate::ExtraViewInfo>
69 BlockedActionBubbleDelegate::GetExtraViewInfo() {
70 return NULL;
Devlin 2016/08/02 20:34:05 prefer nullptr in new code.
catmullings 2016/08/13 00:35:52 Done.
71 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698