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> |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 | 476 |
477 int window_number() const; | 477 int window_number() const; |
478 | 478 |
479 float scale_factor() const; | 479 float scale_factor() const; |
480 | 480 |
481 void AddPendingLatencyInfo( | 481 void AddPendingLatencyInfo( |
482 const std::vector<ui::LatencyInfo>& latency_info); | 482 const std::vector<ui::LatencyInfo>& latency_info); |
483 void SendPendingLatencyInfoToHost(); | 483 void SendPendingLatencyInfoToHost(); |
484 void TickPendingLatencyInfoDelay(); | 484 void TickPendingLatencyInfoDelay(); |
485 | 485 |
| 486 void SendPendingSwapAck(); |
| 487 |
486 private: | 488 private: |
487 friend class RenderWidgetHostView; | 489 friend class RenderWidgetHostView; |
488 friend class RenderWidgetHostViewMacTest; | 490 friend class RenderWidgetHostViewMacTest; |
489 | 491 |
| 492 struct PendingSwapAck { |
| 493 PendingSwapAck(int32 route_id, int gpu_host_id, int32 renderer_id) |
| 494 : route_id(route_id), |
| 495 gpu_host_id(gpu_host_id), |
| 496 renderer_id(renderer_id) {} |
| 497 int32 route_id; |
| 498 int gpu_host_id; |
| 499 int32 renderer_id; |
| 500 }; |
| 501 scoped_ptr<PendingSwapAck> pending_swap_ack_; |
| 502 void AddPendingSwapAck(int32 route_id, int gpu_host_id, int32 renderer_id); |
| 503 |
490 // The view will associate itself with the given widget. The native view must | 504 // The view will associate itself with the given widget. The native view must |
491 // be hooked up immediately to the view hierarchy, or else when it is | 505 // be hooked up immediately to the view hierarchy, or else when it is |
492 // deleted it will delete this out from under the caller. | 506 // deleted it will delete this out from under the caller. |
493 explicit RenderWidgetHostViewMac(RenderWidgetHost* widget); | 507 explicit RenderWidgetHostViewMac(RenderWidgetHost* widget); |
494 | 508 |
495 // Returns whether this render view is a popup (autocomplete window). | 509 // Returns whether this render view is a popup (autocomplete window). |
496 bool IsPopup() const; | 510 bool IsPopup() const; |
497 | 511 |
498 // Shuts down the render_widget_host_. This is a separate function so we can | 512 // Shuts down the render_widget_host_. This is a separate function so we can |
499 // invoke it from the message loop. | 513 // invoke it from the message loop. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; | 600 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
587 | 601 |
588 base::WeakPtrFactory<RenderWidgetHostViewMac> | 602 base::WeakPtrFactory<RenderWidgetHostViewMac> |
589 software_frame_weak_ptr_factory_; | 603 software_frame_weak_ptr_factory_; |
590 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 604 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
591 }; | 605 }; |
592 | 606 |
593 } // namespace content | 607 } // namespace content |
594 | 608 |
595 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 609 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |