| 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <utility> | 12 #include <utility> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/mac/scoped_nsobject.h" | 15 #include "base/mac/scoped_nsobject.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "content/browser/accessibility/browser_accessibility_delegate_mac.h" | |
| 20 #include "content/browser/renderer_host/display_link_mac.h" | 19 #include "content/browser/renderer_host/display_link_mac.h" |
| 21 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 20 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 22 #include "content/browser/renderer_host/software_frame_manager.h" | 21 #include "content/browser/renderer_host/software_frame_manager.h" |
| 23 #include "content/common/cursors/webcursor.h" | 22 #include "content/common/cursors/webcursor.h" |
| 24 #include "content/common/edit_command.h" | 23 #include "content/common/edit_command.h" |
| 25 #import "content/public/browser/render_widget_host_view_mac_base.h" | 24 #import "content/public/browser/render_widget_host_view_mac_base.h" |
| 26 #include "ipc/ipc_sender.h" | 25 #include "ipc/ipc_sender.h" |
| 27 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 26 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
| 28 #include "ui/base/cocoa/base_view.h" | 27 #include "ui/base/cocoa/base_view.h" |
| 29 | 28 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 44 - (content::RenderWidgetHostViewMac*)renderWidgetHostViewMac; | 43 - (content::RenderWidgetHostViewMac*)renderWidgetHostViewMac; |
| 45 @end | 44 @end |
| 46 | 45 |
| 47 // This is the view that lives in the Cocoa view hierarchy. In Windows-land, | 46 // This is the view that lives in the Cocoa view hierarchy. In Windows-land, |
| 48 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles | 47 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles |
| 49 // but that means that the view needs to own the delegate and will dispose of it | 48 // but that means that the view needs to own the delegate and will dispose of it |
| 50 // when it's removed from the view system. | 49 // when it's removed from the view system. |
| 51 @interface RenderWidgetHostViewCocoa | 50 @interface RenderWidgetHostViewCocoa |
| 52 : BaseView <RenderWidgetHostViewMacBase, | 51 : BaseView <RenderWidgetHostViewMacBase, |
| 53 RenderWidgetHostViewMacOwner, | 52 RenderWidgetHostViewMacOwner, |
| 54 NSTextInputClient, | 53 NSTextInputClient> { |
| 55 BrowserAccessibilityDelegateCocoa> { | |
| 56 @private | 54 @private |
| 57 scoped_ptr<content::RenderWidgetHostViewMac> renderWidgetHostView_; | 55 scoped_ptr<content::RenderWidgetHostViewMac> renderWidgetHostView_; |
| 58 // This ivar is the cocoa delegate of the NSResponder. | 56 // This ivar is the cocoa delegate of the NSResponder. |
| 59 base::scoped_nsobject<NSObject<RenderWidgetHostViewMacDelegate>> | 57 base::scoped_nsobject<NSObject<RenderWidgetHostViewMacDelegate>> |
| 60 responderDelegate_; | 58 responderDelegate_; |
| 61 BOOL canBeKeyView_; | 59 BOOL canBeKeyView_; |
| 62 BOOL takesFocusOnlyOnMouseDown_; | 60 BOOL takesFocusOnlyOnMouseDown_; |
| 63 BOOL closeOnDeactivate_; | 61 BOOL closeOnDeactivate_; |
| 64 scoped_ptr<content::RenderWidgetHostViewMacEditCommandHelper> | 62 scoped_ptr<content::RenderWidgetHostViewMacEditCommandHelper> |
| 65 editCommand_helper_; | 63 editCommand_helper_; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 virtual bool CanSubscribeFrame() const OVERRIDE; | 302 virtual bool CanSubscribeFrame() const OVERRIDE; |
| 305 virtual void BeginFrameSubscription( | 303 virtual void BeginFrameSubscription( |
| 306 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) OVERRIDE; | 304 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) OVERRIDE; |
| 307 virtual void EndFrameSubscription() OVERRIDE; | 305 virtual void EndFrameSubscription() OVERRIDE; |
| 308 virtual void OnSwapCompositorFrame( | 306 virtual void OnSwapCompositorFrame( |
| 309 uint32 output_surface_id, scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; | 307 uint32 output_surface_id, scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; |
| 310 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; | 308 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; |
| 311 virtual void AcceleratedSurfaceInitialized(int host_id, | 309 virtual void AcceleratedSurfaceInitialized(int host_id, |
| 312 int route_id) OVERRIDE; | 310 int route_id) OVERRIDE; |
| 313 virtual void CreateBrowserAccessibilityManagerIfNeeded() OVERRIDE; | 311 virtual void CreateBrowserAccessibilityManagerIfNeeded() OVERRIDE; |
| 312 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) |
| 313 OVERRIDE; |
| 314 virtual void OnAccessibilitySetFocus(int acc_obj_id) OVERRIDE; |
| 315 virtual void AccessibilityShowMenu(int acc_obj_id) OVERRIDE; |
| 314 virtual bool PostProcessEventForPluginIme( | 316 virtual bool PostProcessEventForPluginIme( |
| 315 const NativeWebKeyboardEvent& event) OVERRIDE; | 317 const NativeWebKeyboardEvent& event) OVERRIDE; |
| 316 | 318 |
| 317 virtual void AcceleratedSurfaceBuffersSwapped( | 319 virtual void AcceleratedSurfaceBuffersSwapped( |
| 318 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, | 320 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, |
| 319 int gpu_host_id) OVERRIDE; | 321 int gpu_host_id) OVERRIDE; |
| 320 virtual void AcceleratedSurfacePostSubBuffer( | 322 virtual void AcceleratedSurfacePostSubBuffer( |
| 321 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 323 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
| 322 int gpu_host_id) OVERRIDE; | 324 int gpu_host_id) OVERRIDE; |
| 323 virtual void AcceleratedSurfaceSuspend() OVERRIDE; | 325 virtual void AcceleratedSurfaceSuspend() OVERRIDE; |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; | 646 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
| 645 | 647 |
| 646 base::WeakPtrFactory<RenderWidgetHostViewMac> | 648 base::WeakPtrFactory<RenderWidgetHostViewMac> |
| 647 software_frame_weak_ptr_factory_; | 649 software_frame_weak_ptr_factory_; |
| 648 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 650 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 649 }; | 651 }; |
| 650 | 652 |
| 651 } // namespace content | 653 } // namespace content |
| 652 | 654 |
| 653 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 655 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |