Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |