| 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 <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 virtual void OnViewDestroyed() = 0; | 121 virtual void OnViewDestroyed() = 0; |
| 122 | 122 |
| 123 protected: | 123 protected: |
| 124 virtual ~TouchEditingClient() {} | 124 virtual ~TouchEditingClient() {} |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 void set_touch_editing_client(TouchEditingClient* client) { | 127 void set_touch_editing_client(TouchEditingClient* client) { |
| 128 touch_editing_client_ = client; | 128 touch_editing_client_ = client; |
| 129 } | 129 } |
| 130 | 130 |
| 131 explicit RenderWidgetHostViewAura(RenderWidgetHost* host); | 131 RenderWidgetHostViewAura(RenderWidgetHost* host); |
| 132 | 132 |
| 133 // RenderWidgetHostView implementation. | 133 // RenderWidgetHostView implementation. |
| 134 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; | 134 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; |
| 135 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; | 135 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; |
| 136 virtual void SetSize(const gfx::Size& size) OVERRIDE; | 136 virtual void SetSize(const gfx::Size& size) OVERRIDE; |
| 137 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; | 137 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; |
| 138 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 138 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
| 139 virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE; | 139 virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE; |
| 140 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; | 140 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; |
| 141 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; | 141 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() OVERRIDE; | 223 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() OVERRIDE; |
| 224 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() | 224 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() |
| 225 OVERRIDE; | 225 OVERRIDE; |
| 226 virtual bool LockMouse() OVERRIDE; | 226 virtual bool LockMouse() OVERRIDE; |
| 227 virtual void UnlockMouse() OVERRIDE; | 227 virtual void UnlockMouse() OVERRIDE; |
| 228 virtual void OnSwapCompositorFrame( | 228 virtual void OnSwapCompositorFrame( |
| 229 uint32 output_surface_id, | 229 uint32 output_surface_id, |
| 230 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; | 230 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; |
| 231 | 231 |
| 232 #if defined(OS_WIN) | 232 #if defined(OS_WIN) |
| 233 void SetLegacyRenderWidgetHostHWND(LegacyRenderWidgetHostHWND* legacy_hwnd); |
| 233 virtual void SetParentNativeViewAccessible( | 234 virtual void SetParentNativeViewAccessible( |
| 234 gfx::NativeViewAccessible accessible_parent) OVERRIDE; | 235 gfx::NativeViewAccessible accessible_parent) OVERRIDE; |
| 235 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; | 236 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; |
| 236 #endif | 237 #endif |
| 237 | 238 |
| 238 // Overridden from ui::TextInputClient: | 239 // Overridden from ui::TextInputClient: |
| 239 virtual void SetCompositionText( | 240 virtual void SetCompositionText( |
| 240 const ui::CompositionText& composition) OVERRIDE; | 241 const ui::CompositionText& composition) OVERRIDE; |
| 241 virtual void ConfirmCompositionText() OVERRIDE; | 242 virtual void ConfirmCompositionText() OVERRIDE; |
| 242 virtual void ClearCompositionText() OVERRIDE; | 243 virtual void ClearCompositionText() OVERRIDE; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 const gfx::Point& new_origin) OVERRIDE; | 321 const gfx::Point& new_origin) OVERRIDE; |
| 321 | 322 |
| 322 #if defined(OS_WIN) | 323 #if defined(OS_WIN) |
| 323 // Sets the cutout rects from constrained windows. These are rectangles that | 324 // Sets the cutout rects from constrained windows. These are rectangles that |
| 324 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout | 325 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout |
| 325 // rects. | 326 // rects. |
| 326 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects); | 327 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects); |
| 327 | 328 |
| 328 // Updates the cursor clip region. Used for mouse locking. | 329 // Updates the cursor clip region. Used for mouse locking. |
| 329 void UpdateMouseLockRegion(); | 330 void UpdateMouseLockRegion(); |
| 330 | |
| 331 // Notification that the LegacyRenderWidgetHostHWND was destroyed. | |
| 332 void OnLegacyWindowDestroyed(); | |
| 333 #endif | 331 #endif |
| 334 | 332 |
| 335 // Method to indicate if this instance is shutting down or closing. | 333 // Method to indicate if this instance is shutting down or closing. |
| 336 // TODO(shrikant): Discuss around to see if it makes sense to add this method | 334 // TODO(shrikant): Discuss around to see if it makes sense to add this method |
| 337 // as part of RenderWidgetHostView. | 335 // as part of RenderWidgetHostView. |
| 338 bool IsClosing() const { return in_shutdown_; } | 336 bool IsClosing() const { return in_shutdown_; } |
| 339 | 337 |
| 340 // Sets whether the overscroll controller should be enabled for this page. | 338 // Sets whether the overscroll controller should be enabled for this page. |
| 341 void SetOverscrollControllerEnabled(bool enabled); | 339 void SetOverscrollControllerEnabled(bool enabled); |
| 342 | 340 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 // Contains information about each windowed plugin's clip and cutout rects ( | 564 // Contains information about each windowed plugin's clip and cutout rects ( |
| 567 // from the renderer). This is needed because when the transient windoiws | 565 // from the renderer). This is needed because when the transient windoiws |
| 568 // over this view changes, we need this information in order to create a new | 566 // over this view changes, we need this information in order to create a new |
| 569 // region for the HWND. | 567 // region for the HWND. |
| 570 PluginWindowMoves plugin_window_moves_; | 568 PluginWindowMoves plugin_window_moves_; |
| 571 | 569 |
| 572 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used | 570 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used |
| 573 // for accessibility, as the container for windowless plugins like | 571 // for accessibility, as the container for windowless plugins like |
| 574 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, | 572 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, |
| 575 // etc. | 573 // etc. |
| 576 // The LegacyRenderWidgetHostHWND instance is created during the first call | |
| 577 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed | |
| 578 // when the LegacyRenderWidgetHostHWND hwnd is destroyed. | |
| 579 content::LegacyRenderWidgetHostHWND* legacy_render_widget_host_HWND_; | 574 content::LegacyRenderWidgetHostHWND* legacy_render_widget_host_HWND_; |
| 580 | |
| 581 // Set to true if the legacy_render_widget_host_HWND_ instance was destroyed | |
| 582 // by Windows. This could happen if the browser window was destroyed by | |
| 583 // DestroyWindow for e.g. This flag helps ensure that we don't try to create | |
| 584 // the LegacyRenderWidgetHostHWND instance again as that would be a futile | |
| 585 // exercise. | |
| 586 bool legacy_window_destroyed_; | 575 bool legacy_window_destroyed_; |
| 587 #endif | 576 #endif |
| 588 | 577 |
| 589 TouchEditingClient* touch_editing_client_; | 578 TouchEditingClient* touch_editing_client_; |
| 590 | 579 |
| 591 scoped_ptr<OverscrollController> overscroll_controller_; | 580 scoped_ptr<OverscrollController> overscroll_controller_; |
| 592 | 581 |
| 593 gfx::Insets insets_; | 582 gfx::Insets insets_; |
| 594 | 583 |
| 595 std::vector<ui::LatencyInfo> software_latency_info_; | 584 std::vector<ui::LatencyInfo> software_latency_info_; |
| 596 | 585 |
| 597 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; | 586 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; |
| 598 | 587 |
| 599 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 588 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
| 600 | 589 |
| 601 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 590 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 602 }; | 591 }; |
| 603 | 592 |
| 604 } // namespace content | 593 } // namespace content |
| 605 | 594 |
| 606 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 595 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |