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..3f9ce50b51a9117be89fd8968ba75eb30ae7f9fb |
| --- /dev/null |
| +++ b/chrome/browser/ui/website_settings/permission_bubble_delegate.h |
| @@ -0,0 +1,40 @@ |
| +// 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: |
| + 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(); |
|
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
|
| + |
| + // Pass along to the BubbleUI. |
| + Browser* browser(); |
| + const std::vector<PermissionBubbleRequest*>& requests(); |
| + 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
|
| + |
| + private: |
| + PermissionBubbleManager* manager_; |
| + PermissionBubbleView::Factory view_factory_; |
| +}; |
|
please use gerrit instead
2015/08/05 18:05:25
DISALLOW_COPY_AND_ASSIGN(PermissionBubbleDelegate)
hcarmona
2015/08/06 17:43:44
Done.
|
| + |
| +#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_ |