Chromium Code Reviews| Index: chrome/browser/ui/website_settings/permission_bubble_delegate.h |
| diff --git a/chrome/browser/ui/website_settings/permission_bubble_delegate.h b/chrome/browser/ui/website_settings/permission_bubble_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2538036be3417115e70d37f0c89e617ce3132b53 |
| --- /dev/null |
| +++ b/chrome/browser/ui/website_settings/permission_bubble_delegate.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_ |
| +#define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_ |
| + |
| +#include "components/bubble/bubble_delegate.h" |
| +#include "chrome/browser/ui/website_settings/permission_bubble_view.h" |
| + |
| +class PermissionBubbleManager; |
| +class PermissionBubbleRequest; |
| + |
| +class PermissionBubbleDelegate : public BubbleDelegate { |
| + public: |
| + PermissionBubbleDelegate(PermissionBubbleManager* manager, |
| + PermissionBubbleView::Factory view_factory); |
| + ~PermissionBubbleDelegate() override; |
| + |
| + // PermissionBubbleDelegate: |
|
groby-ooo-7-16
2015/08/06 21:32:56
You mean BubbleDelegate?
hcarmona
2015/08/07 02:12:58
Yes. Updated.
|
| + void Finalize() override; |
| + bool CloseOnHide() override; |
| + scoped_ptr<BubbleUI> BuildBubbleUI() override; |
| + void* GetContext() override; |
| + |
| + // Callbacks to the PermissionBubbleManager. |
| + void ToggleAccept(int index, bool new_value); |
| + void Accept(); |
| + void Deny(); |
| + void Closing(); |
| + |
| + // 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.
|
| + Browser* browser(); |
| + const std::vector<PermissionBubbleRequest*>& requests(); |
| + const std::vector<bool>& accept_states(); |
| + |
| + private: |
| + PermissionBubbleManager* manager_; |
| + 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
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(PermissionBubbleDelegate); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_ |