OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_DELEGATE_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_DELEGATE_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_DELEGATE_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_DELEGATE_H_ |
7 | 7 |
| 8 #include "base/strings/string16.h" |
| 9 |
8 namespace content { | 10 namespace content { |
9 struct ContextMenuParams; | 11 struct ContextMenuParams; |
10 class WebContents; | 12 class WebContents; |
11 } | 13 } |
12 | 14 |
13 namespace extensions { | 15 namespace extensions { |
| 16 |
| 17 class AppViewGuest; |
| 18 |
14 // Interface to handle communication between AppView (in extensions) with the | 19 // Interface to handle communication between AppView (in extensions) with the |
15 // browser. | 20 // browser. |
16 class AppViewGuestDelegate { | 21 class AppViewGuestDelegate { |
17 public: | 22 public: |
| 23 explicit AppViewGuestDelegate(AppViewGuest* app_view_guest); |
18 virtual ~AppViewGuestDelegate(); | 24 virtual ~AppViewGuestDelegate(); |
19 | 25 |
| 26 // Returns the task name for <appview>. |
| 27 virtual base::string16 GetTaskName() const = 0; |
| 28 |
20 // Shows the context menu for the guest. | 29 // Shows the context menu for the guest. |
21 // Returns true if the context menu was handled. | 30 // Returns true if the context menu was handled. |
22 virtual bool HandleContextMenu(content::WebContents* web_contents, | 31 virtual bool HandleContextMenu(content::WebContents* web_contents, |
23 const content::ContextMenuParams& params) = 0; | 32 const content::ContextMenuParams& params) = 0; |
| 33 |
| 34 AppViewGuest* app_view_guest() const { return app_view_guest_; } |
| 35 |
| 36 private: |
| 37 AppViewGuest* const app_view_guest_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(AppViewGuestDelegate); |
24 }; | 40 }; |
25 | 41 |
26 } // namespace extensions | 42 } // namespace extensions |
27 | 43 |
28 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_DELEGATE_H_ | 44 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_DELEGATE_H_ |
OLD | NEW |