Melissa Zhang | db4dffa | 2020-07-01 04:03:11 | [diff] [blame] | 1 | // Copyright 2020 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_SHARESHEET_SHARESHEET_SERVICE_DELEGATE_H_ |
| 6 | #define CHROME_BROWSER_SHARESHEET_SHARESHEET_SERVICE_DELEGATE_H_ |
| 7 | |
| 8 | #include <memory> |
| 9 | |
| 10 | class SharesheetBubbleView; |
| 11 | |
| 12 | namespace content { |
| 13 | class WebContents; |
| 14 | } // namespace content |
| 15 | |
| 16 | namespace views { |
| 17 | class View; |
| 18 | } |
| 19 | |
| 20 | namespace sharesheet { |
| 21 | |
| 22 | class SharesheetService; |
| 23 | |
| 24 | class SharesheetServiceDelegate { |
| 25 | public: |
| 26 | explicit SharesheetServiceDelegate(content::WebContents* web_contents, |
| 27 | views::View* bubble_anchor_view); |
| 28 | ~SharesheetServiceDelegate(); |
| 29 | SharesheetServiceDelegate(const SharesheetServiceDelegate&) = delete; |
| 30 | SharesheetServiceDelegate& operator=(const SharesheetServiceDelegate&) = |
| 31 | delete; |
| 32 | |
| 33 | void ShowBubble(); |
| 34 | |
| 35 | private: |
| 36 | std::unique_ptr<SharesheetBubbleView> sharesheet_bubble_view_; |
| 37 | std::unique_ptr<SharesheetService> sharesheet_service_; |
| 38 | }; |
| 39 | |
| 40 | } // namespace sharesheet |
| 41 | |
| 42 | #endif // CHROME_BROWSER_SHARESHEET_SHARESHEET_SERVICE_DELEGATE_H_ |