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..11721929a64a77bab5aac0c750fbd3165c6ded6b |
| --- /dev/null |
| +++ b/chrome/browser/ui/website_settings/permission_bubble_delegate.h |
| @@ -0,0 +1,37 @@ |
| +// 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 "base/callback.h" |
| +#include "components/bubble/bubble_delegate.h" |
| + |
| +class PermissionBubbleManager; |
| +class PermissionBubbleRequest; |
| + |
| +class PermissionBubbleDelegate : public BubbleDelegate { |
| + public: |
| + PermissionBubbleDelegate( |
| + base::Callback<scoped_ptr<BubbleUI>(PermissionBubbleManager*)> ui_factory, |
| + PermissionBubbleManager* manager); |
| + ~PermissionBubbleDelegate() override; |
| + |
| + // BubbleDelegate: |
| + void DidClose() override; |
| + bool ShouldCloseOnHide() const override; |
| + scoped_ptr<BubbleUI> BuildBubbleUI() override; |
| + void* GetContext() const override; |
| + |
| + // Define this function in the platform specific bubble UI implementation. |
|
msw
2015/08/13 03:37:21
Is this a TODO? Otherwise reword this comment to s
|
| + static scoped_ptr<BubbleUI> CreateBubble(PermissionBubbleManager* manager); |
| + |
| + private: |
| + base::Callback<scoped_ptr<BubbleUI>(PermissionBubbleManager*)> ui_factory_; |
| + PermissionBubbleManager* manager_; // Weak. |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PermissionBubbleDelegate); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_ |