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

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

Issue 1858773006: [Extensions UI] Use the ExtensionMessageBubbleBridge for Views platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 #ifndef CHROME_BROWSER_UI_EXTENSIONS_BLOCKED_ACTION_BUBBLE_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_BLOCKED_ACTION_BUBBLE_DELEGATE_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_BLOCKED_ACTION_BUBBLE_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_EXTENSIONS_BLOCKED_ACTION_BUBBLE_DELEGATE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h" 10 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h"
11 11
12 // The delegate for the bubble to ask the user if they want to refresh the page 12 // The delegate for the bubble to ask the user if they want to refresh the page
13 // in order to run any blocked actions the extension may have. 13 // in order to run any blocked actions the extension may have.
14 class BlockedActionBubbleDelegate : public ToolbarActionsBarBubbleDelegate { 14 class BlockedActionBubbleDelegate : public ToolbarActionsBarBubbleDelegate {
15 public: 15 public:
16 BlockedActionBubbleDelegate(const base::Callback<void(CloseAction)>& callback, 16 BlockedActionBubbleDelegate(const base::Callback<void(CloseAction)>& callback,
17 const std::string& extension_id); 17 const std::string& extension_id);
18 ~BlockedActionBubbleDelegate() override; 18 ~BlockedActionBubbleDelegate() override;
19 19
20 private: 20 private:
21 // ToolbarActionsBarBubbleDelegate: 21 // ToolbarActionsBarBubbleDelegate:
22 bool ShouldShow() override;
23 bool ShouldCloseOnDeactivate() override;
22 base::string16 GetHeadingText() override; 24 base::string16 GetHeadingText() override;
23 base::string16 GetBodyText() override; 25 base::string16 GetBodyText(bool anchored_to_action) override;
24 base::string16 GetItemListText() override; 26 base::string16 GetItemListText() override;
25 base::string16 GetActionButtonText() override; 27 base::string16 GetActionButtonText() override;
26 base::string16 GetDismissButtonText() override; 28 base::string16 GetDismissButtonText() override;
27 base::string16 GetLearnMoreButtonText() override; 29 base::string16 GetLearnMoreButtonText() override;
28 std::string GetAnchorActionId() override; 30 std::string GetAnchorActionId() override;
29 void OnBubbleShown() override; 31 void OnBubbleShown() override;
30 void OnBubbleClosed(CloseAction action) override; 32 void OnBubbleClosed(CloseAction action) override;
33 bool IsExtensionMessageBubble() override;
31 34
32 base::Callback<void(CloseAction)> callback_; 35 base::Callback<void(CloseAction)> callback_;
33 std::string extension_id_; 36 std::string extension_id_;
34 37
35 DISALLOW_COPY_AND_ASSIGN(BlockedActionBubbleDelegate); 38 DISALLOW_COPY_AND_ASSIGN(BlockedActionBubbleDelegate);
36 }; 39 };
37 40
38 #endif // CHROME_BROWSER_UI_EXTENSIONS_BLOCKED_ACTION_BUBBLE_DELEGATE_H_ 41 #endif // CHROME_BROWSER_UI_EXTENSIONS_BLOCKED_ACTION_BUBBLE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698