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