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

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: Update 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:
21 scoped_ptr<BubbleUI> BuildBubbleUI() override;
22 void* GetContext() override;
23
24 // Callbacks to the PermissionBubbleManager.
25 void ToggleAccept(int index, bool new_value);
26 void Accept();
27 void Deny();
28 void Closing();
please use gerrit instead 2015/08/05 18:05:25 These methods (at least Accept(), Deny(), and Clos
hcarmona 2015/08/05 18:43:47 These are all callbacks from the UI. What's the ad
29
30 // Pass along to the BubbleUI.
31 Browser* browser();
32 const std::vector<PermissionBubbleRequest*>& requests();
33 const std::vector<bool>& accept_states();
please use gerrit instead 2015/08/05 18:05:25 These methods are used only in BuildBubbleUI(), so
hcarmona 2015/08/05 18:43:47 Only this class knows about it, so it shouldn't be
34
35 private:
36 PermissionBubbleManager* manager_;
37 PermissionBubbleView::Factory view_factory_;
38 };
please use gerrit instead 2015/08/05 18:05:25 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleDelegate)
hcarmona 2015/08/06 17:43:44 Done.
39
40 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698