Chromium Code Reviews| 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 #include "content/common/content_export.h" | |
| 12 | |
| 13 struct ContextMenuParams; | |
| 14 class RenderWidgetHost; | |
| 15 @protocol RenderWidgetHostViewMacDelegate; | |
| 16 | |
| 17 namespace content { | |
| 18 | |
| 19 class WebDragDestDelegate; | |
| 20 | |
| 21 // This interface allows a client to extend the functionality of | |
| 22 // WebContentsViewMac. | |
| 23 class CONTENT_EXPORT WebContentsViewMacDelegate { | |
|
jam
2012/02/03 18:15:41
nit: I don't think you need CONTENT_EXPORT since i
| |
| 24 public: | |
| 25 virtual ~WebContentsViewMacDelegate() {} | |
| 26 | |
| 27 // Returns a newly-created delegate for the RenderWidgetHostViewMac, to handle | |
| 28 // events on the responder chain. | |
| 29 virtual NSObject<RenderWidgetHostViewMacDelegate>* | |
| 30 CreateRenderWidgetHostViewDelegate( | |
| 31 RenderWidgetHost* render_widget_host) = 0; | |
| 32 | |
| 33 // Returns a delegate to process drags not handled by content. | |
| 34 virtual WebDragDestDelegate* DragDelegate() = 0; | |
| 35 | |
| 36 // Shows a context menu. | |
| 37 virtual void ShowContextMenu(const ContextMenuParams& params) = 0; | |
| 38 | |
| 39 // Notifications that the native view was created/destroyed. | |
| 40 virtual void NativeViewCreated(NSView* view) = 0; | |
| 41 virtual void NativeViewDestroyed(NSView* view) = 0; | |
| 42 }; | |
| 43 | |
| 44 } // namespace content | |
| 45 | |
| 46 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_MAC_DELEGATE_H_ | |
| OLD | NEW |