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/IOSurfaceAPI.h> | 9 #include <IOSurface/IOSurfaceAPI.h> |
10 #include <list> | 10 #include <list> |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 void SetTextInputActive(bool active); | 367 void SetTextInputActive(bool active); |
368 | 368 |
369 // Sends completed plugin IME notification and text back to the renderer. | 369 // Sends completed plugin IME notification and text back to the renderer. |
370 void PluginImeCompositionCompleted(const base::string16& text, int plugin_id); | 370 void PluginImeCompositionCompleted(const base::string16& text, int plugin_id); |
371 | 371 |
372 const std::string& selected_text() const { return selected_text_; } | 372 const std::string& selected_text() const { return selected_text_; } |
373 | 373 |
374 // Update the IOSurface to be drawn and call setNeedsDisplay on | 374 // Update the IOSurface to be drawn and call setNeedsDisplay on |
375 // |cocoa_view_|. | 375 // |cocoa_view_|. |
376 void CompositorSwapBuffers(IOSurfaceID surface_handle, | 376 void CompositorSwapBuffers(IOSurfaceID surface_handle, |
377 const gfx::Size& size, | 377 const gfx::Rect& damage_rect, |
| 378 const gfx::Size& surface_size, |
378 float scale_factor, | 379 float scale_factor, |
379 const std::vector<ui::LatencyInfo>& latency_info); | 380 const std::vector<ui::LatencyInfo>& latency_info); |
380 | 381 |
381 // Called when a GPU error is detected. Posts a task to destroy all | 382 // Called when a GPU error is detected. Posts a task to destroy all |
382 // compositing state. | 383 // compositing state. |
383 void GotAcceleratedCompositingError(); | 384 void GotAcceleratedCompositingError(); |
384 | 385 |
385 // Returns true and stores first rectangle for character range if the | 386 // Returns true and stores first rectangle for character range if the |
386 // requested |range| is already cached, otherwise returns false. | 387 // requested |range| is already cached, otherwise returns false. |
387 // Exposed for testing. | 388 // Exposed for testing. |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 | 610 |
610 // The fullscreen window used for pepper flash. | 611 // The fullscreen window used for pepper flash. |
611 base::scoped_nsobject<NSWindow> pepper_fullscreen_window_; | 612 base::scoped_nsobject<NSWindow> pepper_fullscreen_window_; |
612 base::scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_; | 613 base::scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_; |
613 // Our parent host view, if this is fullscreen. NULL otherwise. | 614 // Our parent host view, if this is fullscreen. NULL otherwise. |
614 RenderWidgetHostViewMac* fullscreen_parent_host_view_; | 615 RenderWidgetHostViewMac* fullscreen_parent_host_view_; |
615 | 616 |
616 // Display link for getting vsync info. | 617 // Display link for getting vsync info. |
617 scoped_refptr<DisplayLinkMac> display_link_; | 618 scoped_refptr<DisplayLinkMac> display_link_; |
618 | 619 |
| 620 // The current VSync timebase and interval. This is zero until the first call |
| 621 // to SendVSyncParametersToRenderer(), and refreshed regularly thereafter. |
| 622 base::TimeTicks vsync_timebase_; |
| 623 base::TimeDelta vsync_interval_; |
| 624 |
619 // The current composition character range and its bounds. | 625 // The current composition character range and its bounds. |
620 gfx::Range composition_range_; | 626 gfx::Range composition_range_; |
621 std::vector<gfx::Rect> composition_bounds_; | 627 std::vector<gfx::Rect> composition_bounds_; |
622 | 628 |
623 // The current caret bounds. | 629 // The current caret bounds. |
624 gfx::Rect caret_rect_; | 630 gfx::Rect caret_rect_; |
625 | 631 |
626 // Subscriber that listens to frame presentation events. | 632 // Subscriber that listens to frame presentation events. |
627 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; | 633 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
628 | 634 |
629 base::WeakPtrFactory<RenderWidgetHostViewMac> | 635 base::WeakPtrFactory<RenderWidgetHostViewMac> |
630 software_frame_weak_ptr_factory_; | 636 software_frame_weak_ptr_factory_; |
631 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 637 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
632 }; | 638 }; |
633 | 639 |
634 } // namespace content | 640 } // namespace content |
635 | 641 |
636 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 642 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |