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

Side by Side Diff: chrome/browser/ui/website_settings/permission_bubble_delegate.h

Issue 1251633002: Add BubbleManager to manage bubbles and ChromeBubbleManager for events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply Feedback Created 5 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
(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 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_
7
8 #include "components/bubble/bubble_delegate.h"
9 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
10
11 class PermissionBubbleManager;
12 class PermissionBubbleRequest;
13
14 class PermissionBubbleDelegate : public BubbleDelegate {
15 public:
16 PermissionBubbleDelegate(PermissionBubbleManager* manager,
17 PermissionBubbleView::Factory view_factory);
18 ~PermissionBubbleDelegate() override;
19
20 // PermissionBubbleDelegate:
groby-ooo-7-16 2015/08/06 21:32:56 You mean BubbleDelegate?
hcarmona 2015/08/07 02:12:58 Yes. Updated.
21 void Finalize() override;
22 bool CloseOnHide() override;
23 scoped_ptr<BubbleUI> BuildBubbleUI() override;
24 void* GetContext() override;
25
26 // Callbacks to the PermissionBubbleManager.
27 void ToggleAccept(int index, bool new_value);
28 void Accept();
29 void Deny();
30 void Closing();
31
32 // Pass along to the BubbleUI.
groby-ooo-7-16 2015/08/06 21:32:56 That comment doesn't make sense to me. Pass along
hcarmona 2015/08/07 02:12:58 Removed browser and updated comment.
33 Browser* browser();
34 const std::vector<PermissionBubbleRequest*>& requests();
35 const std::vector<bool>& accept_states();
36
37 private:
38 PermissionBubbleManager* manager_;
39 PermissionBubbleView::Factory view_factory_;
groby-ooo-7-16 2015/08/06 21:32:56 Really? Each delegate needs its own personal facto
hcarmona 2015/08/07 02:12:58 It's a callback to the constructor to allow inject
40
41 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleDelegate);
42 };
43
44 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698