| 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 <IOSurface/IOSurface.h> | 9 #include <IOSurface/IOSurface.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "content/common/content_export.h" | 31 #include "content/common/content_export.h" |
| 32 #include "content/common/cursors/webcursor.h" | 32 #include "content/common/cursors/webcursor.h" |
| 33 #include "content/common/edit_command.h" | 33 #include "content/common/edit_command.h" |
| 34 #include "ipc/ipc_sender.h" | 34 #include "ipc/ipc_sender.h" |
| 35 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 35 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
| 36 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" | 36 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" |
| 37 #include "ui/accelerated_widget_mac/display_link_mac.h" | 37 #include "ui/accelerated_widget_mac/display_link_mac.h" |
| 38 #import "ui/base/cocoa/command_dispatcher.h" | 38 #import "ui/base/cocoa/command_dispatcher.h" |
| 39 #include "ui/base/cocoa/remote_layer_api.h" | 39 #include "ui/base/cocoa/remote_layer_api.h" |
| 40 #import "ui/base/cocoa/tool_tip_base_view.h" | 40 #import "ui/base/cocoa/tool_tip_base_view.h" |
| 41 #include "ui/gfx/display_observer.h" | 41 #include "ui/display/display_observer.h" |
| 42 | 42 |
| 43 namespace content { | 43 namespace content { |
| 44 class RenderWidgetHostImpl; | 44 class RenderWidgetHostImpl; |
| 45 class RenderWidgetHostViewMac; | 45 class RenderWidgetHostViewMac; |
| 46 class RenderWidgetHostViewMacEditCommandHelper; | 46 class RenderWidgetHostViewMacEditCommandHelper; |
| 47 class WebContents; | 47 class WebContents; |
| 48 struct TextInputState; | 48 struct TextInputState; |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace ui { | 51 namespace ui { |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 // "The lifetime of the RenderWidgetHost* is tied to the render process. | 222 // "The lifetime of the RenderWidgetHost* is tied to the render process. |
| 223 // If the render process dies, the RenderWidgetHost* goes away and all | 223 // If the render process dies, the RenderWidgetHost* goes away and all |
| 224 // references to it must become NULL." | 224 // references to it must become NULL." |
| 225 // | 225 // |
| 226 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. | 226 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. |
| 227 class CONTENT_EXPORT RenderWidgetHostViewMac | 227 class CONTENT_EXPORT RenderWidgetHostViewMac |
| 228 : public RenderWidgetHostViewBase, | 228 : public RenderWidgetHostViewBase, |
| 229 public DelegatedFrameHostClient, | 229 public DelegatedFrameHostClient, |
| 230 public ui::AcceleratedWidgetMacNSView, | 230 public ui::AcceleratedWidgetMacNSView, |
| 231 public IPC::Sender, | 231 public IPC::Sender, |
| 232 public gfx::DisplayObserver, | 232 public display::DisplayObserver, |
| 233 public cc::BeginFrameObserverBase { | 233 public cc::BeginFrameObserverBase { |
| 234 public: | 234 public: |
| 235 // The view will associate itself with the given widget. The native view must | 235 // The view will associate itself with the given widget. The native view must |
| 236 // be hooked up immediately to the view hierarchy, or else when it is | 236 // be hooked up immediately to the view hierarchy, or else when it is |
| 237 // deleted it will delete this out from under the caller. | 237 // deleted it will delete this out from under the caller. |
| 238 // | 238 // |
| 239 // When |is_guest_view_hack| is true, this view isn't really the view for | 239 // When |is_guest_view_hack| is true, this view isn't really the view for |
| 240 // the |widget|, a RenderWidgetHostViewGuest is. | 240 // the |widget|, a RenderWidgetHostViewGuest is. |
| 241 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated | 241 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated |
| 242 // to use RWHVChildFrame (http://crbug.com/330264). | 242 // to use RWHVChildFrame (http://crbug.com/330264). |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 const ui::LatencyInfo& latency) override; | 349 const ui::LatencyInfo& latency) override; |
| 350 void ProcessGestureEvent(const blink::WebGestureEvent& event, | 350 void ProcessGestureEvent(const blink::WebGestureEvent& event, |
| 351 const ui::LatencyInfo& latency) override; | 351 const ui::LatencyInfo& latency) override; |
| 352 void TransformPointToLocalCoordSpace(const gfx::Point& point, | 352 void TransformPointToLocalCoordSpace(const gfx::Point& point, |
| 353 cc::SurfaceId original_surface, | 353 cc::SurfaceId original_surface, |
| 354 gfx::Point* transformed_point) override; | 354 gfx::Point* transformed_point) override; |
| 355 | 355 |
| 356 // IPC::Sender implementation. | 356 // IPC::Sender implementation. |
| 357 bool Send(IPC::Message* message) override; | 357 bool Send(IPC::Message* message) override; |
| 358 | 358 |
| 359 // gfx::DisplayObserver implementation. | 359 // display::DisplayObserver implementation. |
| 360 void OnDisplayAdded(const gfx::Display& new_display) override; | 360 void OnDisplayAdded(const display::Display& new_display) override; |
| 361 void OnDisplayRemoved(const gfx::Display& old_display) override; | 361 void OnDisplayRemoved(const display::Display& old_display) override; |
| 362 void OnDisplayMetricsChanged(const gfx::Display& display, | 362 void OnDisplayMetricsChanged(const display::Display& display, |
| 363 uint32_t metrics) override; | 363 uint32_t metrics) override; |
| 364 | 364 |
| 365 // Forwards the mouse event to the renderer. | 365 // Forwards the mouse event to the renderer. |
| 366 void ForwardMouseEvent(const blink::WebMouseEvent& event); | 366 void ForwardMouseEvent(const blink::WebMouseEvent& event); |
| 367 | 367 |
| 368 // Called when RenderWidget wants to start BeginFrame scheduling or stop. | 368 // Called when RenderWidget wants to start BeginFrame scheduling or stop. |
| 369 void OnSetNeedsBeginFrames(bool needs_begin_frames); | 369 void OnSetNeedsBeginFrames(bool needs_begin_frames); |
| 370 | 370 |
| 371 void KillSelf(); | 371 void KillSelf(); |
| 372 | 372 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 | 616 |
| 617 // Factory used to safely scope delayed calls to ShutdownHost(). | 617 // Factory used to safely scope delayed calls to ShutdownHost(). |
| 618 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 618 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
| 619 | 619 |
| 620 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 620 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 621 }; | 621 }; |
| 622 | 622 |
| 623 } // namespace content | 623 } // namespace content |
| 624 | 624 |
| 625 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 625 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |