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..0a71e9456272d4af2483e7adaba2ee0c26201249 |
| --- /dev/null |
| +++ b/chrome/browser/ui/website_settings/permission_bubble_delegate.h |
| @@ -0,0 +1,43 @@ |
| +// 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; |
| + |
| + // BubbleDelegate: |
| + void Finalize() override; |
|
please use gerrit instead
2015/08/07 23:02:27
DidClose().
hcarmona
2015/08/11 02:35:45
Done.
|
| + bool CloseOnHide() override; |
|
please use gerrit instead
2015/08/07 23:02:27
ShouldCloseOnHide().
hcarmona
2015/08/11 02:35:45
Done.
|
| + 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(); |
| + |
| + // Bubbles should not hold a reference to these values. |
| + const std::vector<PermissionBubbleRequest*>& GetRequests(); |
| + const std::vector<bool>& GetAcceptStates(); |
| + |
| + private: |
| + PermissionBubbleManager* manager_; |
|
please use gerrit instead
2015/08/07 23:02:27
be wevy wevy careful
hcarmona
2015/08/11 02:35:46
Acknowledged.
|
| + PermissionBubbleView::Factory view_factory_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PermissionBubbleDelegate); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_ |