OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_MAC_DELEGATE_H_ | |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_MAC_DELEGATE_H_ | |
7 #pragma once | |
8 | |
9 #import <Cocoa/Cocoa.h> | |
10 | |
11 @protocol RenderWidgetHostViewMacDelegate; | |
12 | |
13 namespace content { | |
14 | |
15 class RenderWidgetHost; | |
16 class WebDragDestDelegate; | |
17 struct ContextMenuParams; | |
18 | |
19 // This interface allows a client to extend the functionality of | |
20 // WebContentsViewMac. | |
21 class WebContentsViewMacDelegate { | |
22 public: | |
23 virtual ~WebContentsViewMacDelegate() {} | |
24 | |
25 // Returns a newly-created delegate for the RenderWidgetHostViewMac, to handle | |
26 // events on the responder chain. | |
27 virtual NSObject<RenderWidgetHostViewMacDelegate>* | |
28 CreateRenderWidgetHostViewDelegate( | |
29 RenderWidgetHost* render_widget_host) = 0; | |
30 | |
31 // Returns a delegate to process drags not handled by content. | |
32 virtual WebDragDestDelegate* DragDelegate() = 0; | |
33 | |
34 // Shows a context menu. | |
35 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0; | |
36 | |
37 // Notifications that the native view was created/destroyed. | |
38 virtual void NativeViewCreated(NSView* view) = 0; | |
39 virtual void NativeViewDestroyed(NSView* view) = 0; | |
40 }; | |
41 | |
42 } // namespace content | |
43 | |
44 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_MAC_DELEGATE_H_ | |
OLD | NEW |