| 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_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.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 "cc/resources/texture_mailbox.h" |
| 18 #include "content/browser/accessibility/browser_accessibility_manager.h" | 19 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 19 #include "content/browser/renderer_host/image_transport_factory.h" | 20 #include "content/browser/renderer_host/image_transport_factory.h" |
| 20 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 21 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 21 #include "content/common/content_export.h" | 22 #include "content/common/content_export.h" |
| 22 #include "content/common/gpu/client/gl_helper.h" | 23 #include "content/common/gpu/client/gl_helper.h" |
| 23 #include "third_party/skia/include/core/SkRegion.h" | 24 #include "third_party/skia/include/core/SkRegion.h" |
| 24 #include "ui/aura/client/activation_change_observer.h" | 25 #include "ui/aura/client/activation_change_observer.h" |
| 25 #include "ui/aura/client/activation_delegate.h" | 26 #include "ui/aura/client/activation_delegate.h" |
| 26 #include "ui/aura/client/cursor_client_observer.h" | 27 #include "ui/aura/client/cursor_client_observer.h" |
| 27 #include "ui/aura/client/focus_change_observer.h" | 28 #include "ui/aura/client/focus_change_observer.h" |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 void SwapDelegatedFrame( | 478 void SwapDelegatedFrame( |
| 478 scoped_ptr<cc::DelegatedFrameData> frame_data, | 479 scoped_ptr<cc::DelegatedFrameData> frame_data, |
| 479 float frame_device_scale_factor, | 480 float frame_device_scale_factor, |
| 480 const ui::LatencyInfo& latency_info); | 481 const ui::LatencyInfo& latency_info); |
| 481 void SendDelegatedFrameAck(); | 482 void SendDelegatedFrameAck(); |
| 482 | 483 |
| 483 void SwapSoftwareFrame( | 484 void SwapSoftwareFrame( |
| 484 scoped_ptr<cc::SoftwareFrameData> frame_data, | 485 scoped_ptr<cc::SoftwareFrameData> frame_data, |
| 485 float frame_device_scale_factor, | 486 float frame_device_scale_factor, |
| 486 const ui::LatencyInfo& latency_info); | 487 const ui::LatencyInfo& latency_info); |
| 487 void SendSoftwareFrameAck(const TransportDIB::Id& id); | 488 void SendSoftwareFrameAck(unsigned software_frame_id); |
| 488 | 489 |
| 489 BrowserAccessibilityManager* GetOrCreateBrowserAccessibilityManager(); | 490 BrowserAccessibilityManager* GetOrCreateBrowserAccessibilityManager(); |
| 490 | 491 |
| 491 #if defined(OS_WIN) | 492 #if defined(OS_WIN) |
| 492 // Sets the cutout rects from transient windows. These are rectangles that | 493 // Sets the cutout rects from transient windows. These are rectangles that |
| 493 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout | 494 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout |
| 494 // rects. | 495 // rects. |
| 495 void UpdateTransientRects(const std::vector<gfx::Rect>& rects); | 496 void UpdateTransientRects(const std::vector<gfx::Rect>& rects); |
| 496 | 497 |
| 497 // Updates the total list of cutout rects, which is the union of transient | 498 // Updates the total list of cutout rects, which is the union of transient |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 bool has_composition_text_; | 556 bool has_composition_text_; |
| 556 | 557 |
| 557 // Current tooltip text. | 558 // Current tooltip text. |
| 558 string16 tooltip_; | 559 string16 tooltip_; |
| 559 | 560 |
| 560 std::vector<base::Closure> on_compositing_did_commit_callbacks_; | 561 std::vector<base::Closure> on_compositing_did_commit_callbacks_; |
| 561 | 562 |
| 562 // The current frontbuffer texture. | 563 // The current frontbuffer texture. |
| 563 scoped_refptr<ui::Texture> current_surface_; | 564 scoped_refptr<ui::Texture> current_surface_; |
| 564 | 565 |
| 565 // The current frontbuffer DIB. | 566 // The current software frontbuffer. |
| 566 scoped_ptr<TransportDIB> current_dib_; | 567 cc::TextureMailbox current_software_frame_; |
| 567 | |
| 568 // The current DIB id as it was received from the renderer. Note that on | |
| 569 // some platforms (e.g. Windows) this is different from current_dib_->id(). | |
| 570 TransportDIB::Id current_dib_id_; | |
| 571 | 568 |
| 572 // The damage in the previously presented buffer. | 569 // The damage in the previously presented buffer. |
| 573 SkRegion previous_damage_; | 570 SkRegion previous_damage_; |
| 574 | 571 |
| 575 // Pending damage from previous frames that we skipped. | 572 // Pending damage from previous frames that we skipped. |
| 576 SkRegion skipped_damage_; | 573 SkRegion skipped_damage_; |
| 577 | 574 |
| 578 // The size of the last frame that was swapped (even if we skipped it). | 575 // The size of the last frame that was swapped (even if we skipped it). |
| 579 // Used to determine when the skipped_damage_ needs to be reset due to | 576 // Used to determine when the skipped_damage_ needs to be reset due to |
| 580 // size changes between front- and backbuffer. | 577 // size changes between front- and backbuffer. |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 yuv_readback_pipeline_; | 677 yuv_readback_pipeline_; |
| 681 | 678 |
| 682 TouchEditingClient* touch_editing_client_; | 679 TouchEditingClient* touch_editing_client_; |
| 683 | 680 |
| 684 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 681 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 685 }; | 682 }; |
| 686 | 683 |
| 687 } // namespace content | 684 } // namespace content |
| 688 | 685 |
| 689 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 686 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |